rpac_function: Create a template for a function in roxygen2 style

View source: R/rpac_function.R

rpac_functionR Documentation

Create a template for a function in roxygen2 style

Description

rpac_function() creates a file with a template to create a function. Follows roxygen2 conventions and intended to be used with devtools.

Usage

rpac_function(function_name = NULL, pkg_name = NULL, path = "./R",
  author = NULL, github_user = NULL, level = "short", email = NULL,
  open = TRUE)

Arguments

function_name

Function name, used to create file name. Appends '.R'.

pkg_name

package name as string.

path

Pass a path as string. Default is to place files for functions in the directory './R'.

author

Author name as string.

github_user

Pass as string, will be inserted into "https://github.com/github_user/"

level

'short' provides placeholders; 'long' adds explanations.

email

Currently not used. Default is NULL

open

Open the project in RStudio on creation. Default is TRUE.

Note

level 'short' is not so short.

Author(s)

Antonio J Berlanga-Taylor <https://github.com/AntonioJBT/Rpacker>

See Also

<http://r-pkgs.had.co.nz/r.html>

Examples


## Not run: 
rpac_function(function_name = 'rpac_test_long2',
              pkg_name = 'Rpacker',
              path = 'R',
              author = 'Antonio',
              github_user = 'antonio',
              level = 'long',
              open = TRUE # tries to open file
              )


## End(Not run)


AntonioJBT/Rpacker documentation built on May 1, 2024, 1:06 a.m.