Skip to contents

Create Package Directory

Usage

create_pkg_dir(pkg_dir)

Arguments

pkg_dir

path to package directory to be created, including the pkgname as last folder

Value

creates directory for package if not existing

Examples

## not a valid pkg folder
if (FALSE) { # \dontrun{
pkg_dir <- file.path(tempdir(), "pkgname/pkgname")
create_pkg_dir(pkg_dir)
} # }
## valid pkg folder
pkg_dir <- file.path(tempdir(), "pkgname")
create_pkg_dir(pkg_dir)
#> C:\Users\RUNNER~1\AppData\Local\Temp\RtmpmSkFFM/pkgname is a valid 'root_dir' for pkg 'pkgname'
#> [1] "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\RtmpmSkFFM/pkgname"