| Title: | Create an R Package with One Simple Function |
|---|---|
| Description: | Simplifies the process of creating R packages by providing a single, straightforward function that handles package initialization, Git integration, license selection, README generation, and pkgdown site setup. Package creation can also be configured using YAML or JSON configuration files. |
| Authors: | Shaurita Hutchins [aut, cre] (ORCID: <https://orcid.org/0000-0002-7687-0059>) |
| Maintainer: | Shaurita Hutchins <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-09 19:15:48 UTC |
| Source: | https://github.com/sdhutchins/pkgmkr |
Import configuration data from a file.
import_config(path, file_type = "yaml")import_config(path, file_type = "yaml")
path |
character. The path to the configuration file. |
file_type |
character. The file type of the configuration file (either "yaml" or "json"). |
A list containing the configuration data.
Create a new R package with the specified parameters
mk_pkg( path, author, email, git = TRUE, git_username = NULL, git_email = NULL, readme_md = TRUE, check_pkg_name = TRUE, license = "MIT", pkgdown = TRUE )mk_pkg( path, author, email, git = TRUE, git_username = NULL, git_email = NULL, readme_md = TRUE, check_pkg_name = TRUE, license = "MIT", pkgdown = TRUE )
path |
character. The path to create the package at. |
author |
character. The name of the package author. |
email |
character. The email to use for Git and GitHub. |
git |
logical. Whether to initialize a Git repository for the package. |
git_username |
character. The username to use for Git and GitHub. |
git_email |
character. The email to use for Git and GitHub. |
readme_md |
logical. Whether to create a README file in markdown format. |
check_pkg_name |
logical. Whether to check that the package name is available on CRAN. |
license |
character. The license to use for the package (either "MIT" or "GPL-3"). |
pkgdown |
logical. Whether to create a pkgdown site for the package. |
Create a package based on a configuration file.
mk_pkg_from_config(config_path, file_type = "yaml")mk_pkg_from_config(config_path, file_type = "yaml")
config_path |
character. The path to the configuration file. |
file_type |
character. The file type of the configuration file (either "yaml" or "json"). |
Write configuration data to a file.
write_config(path, config_data)write_config(path, config_data)
path |
character. The path to write the configuration file to. |
config_data |
list. The configuration data to write to the file. |