new_r(fun, path = "R", file.name = NULL)
function
or character string naming the
function."R"
for ease of use within RStudio.fun
+ ".R".
This can be changed by supplying a file name to file.name
.Generates a ____.R file.
Quickly produce a roxygen2 style
.R template file from a function
(output file will
include the function) or a character string.
dir.create("temp_dir") new_r(paste, "temp_dir")R file created: temp_dir/paste.Rnew_r("myfun", "temp_dir")R file created: temp_dir/myfun.Runlink("temp_dir", TRUE, TRUE)