Use Package Skeleton

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)
#> /tmp/RtmprDPzJB/pkgname is a valid 'root_dir' for pkg 'pkgname'
#> Warning: /tmp/RtmprDPzJB/pkgname cannot be created. It exists and is empty.
withr::with_dir(pkg_dir, {use_pkg_skeleton(pkg_name)})
#> ✔ Setting active project to '/tmp/RtmprDPzJB/pkgname' #> ✔ Writing 'pkgname.Rproj' #> ✔ Adding '.Rproj.user' to '.gitignore'