Automatically generate a file containing functions and related code for R package development.
Usage
add_pkg_file(
desc_file,
pkg_name = NULL,
title = NULL,
pkg_description = NULL,
author_name = NULL,
author_email = NULL,
github_url = NULL,
output_dir = NULL,
use_figlet = TRUE,
figlet_font = "Slant",
colors = c("red", "yellow", "green", "magenta", "cyan", "yellow", "green", "white",
"magenta", "cyan"),
unicode = TRUE,
verbose = TRUE
)
Arguments
- desc_file
The DESCRIPTION file. Must be provided, it will be used to extract package information. Using
add_pkg_file("DESCRIPTION", output_dir = "R")
, will be created<pkg_name>-package.R
based on the DESCRIPTION file in"R"
directory. If you want to use some specific information, such asauthor_name
orauthor_email
, you can provide them manually.- pkg_name
Character string, the name of the package. Default is
NULL
, which will be read from DESCRIPTION file.- title
Character string, title of the package. Default is
NULL
, which will be read from DESCRIPTION file.- pkg_description
Character string, short description of the package. Default is
NULL
, which will be read from DESCRIPTION file.Character string, name of the package author. Default is
NULL
, which will be read from DESCRIPTION file.Character string, email of the package author. Default is
NULL
, which will be read from DESCRIPTION file.- github_url
Character string, GitHub URL of the package. Default is
NULL
, which will be read from DESCRIPTION file or constructed based on package name.- output_dir
Character string, directory where to save the package file. Default is
NULL
, you should specify it, such as"R"
.- use_figlet
Whether to use figlet for ASCII art generation. Default is
TRUE
. Details see figlet.- figlet_font
Character string, figlet font to use. Default is
"Slant"
.- colors
Character vector, colors to use for the logo elements.
- unicode
Whether to use Unicode symbols. Default is
TRUE
.- verbose
Whether to print progress messages. Default is
TRUE
.