Skip to contents

Use Package Skeleton

Usage

use_pkg_skeleton(pkg_name)

Arguments

pkg_name

name of R package

Value

creates pkg skeleton in current working directory

Examples

## valid pkg folder
pkg_name <- "pkgname"
pkg_dir <- file.path(tempdir(), pkg_name)
pkg_dir <- create_pkg_dir(pkg_dir)
#> C:\Users\RUNNER~1\AppData\Local\Temp\RtmpmSkFFM/pkgname is a valid 'root_dir' for pkg 'pkgname'
#> Warning: C:\Users\RUNNER~1\AppData\Local\Temp\RtmpmSkFFM/pkgname was not created as it already existed.
withr::with_dir(pkg_dir, {use_pkg_skeleton(pkg_name)})
#>  Setting active project to
#>   "C:/Users/runneradmin/AppData/Local/Temp/RtmpmSkFFM/pkgname".
#>  Writing pkgname.Rproj.
#>  Adding ".Rproj.user" to .gitignore.
#> NULL