Learn R Programming

berryFunctions (version 1.22.5)

createFun: create function framework

Description

create a file with a complete (Roxygen) framework for a new function in a package

Usage

createFun(fun, path = ".", open = TRUE)

Value

file name as character string

Arguments

fun

Character string or unquoted name. Function that will be created with identical filename.

path

Path to package in development (including package name itself). Is passed to packagePath. DEFAULT: "."

open

Logical: open the file? If several instances of Rstudio are open, the last one (not necessarily the active one) will be used. DEFAULT: TRUE

Author

Berry Boessenkool, berry-b@gmx.de, March 2016

Details

Tries to open the file in the standard editor for .R files using system2

See Also

Examples

Run this code
#createFun("myNewFunction")

Run the code above in your browser using DataLab