This function automates the process of building a Github R package with the desired data stored in the `raw-data` folder.

dpr_create_package(
  package_name,
  export_folder = getwd(),
  git_remote,
  list_data = NULL
)

Arguments

package_name

is the name of the created data R package.

export_folder

is the base folder where the package folder will be created.

git_remote

is the `HTTPS` url of the GitHub remote.

list_data

is a list object of named ojbects that can be written to a csv. If NULL then no data writing actions happen.

Examples

dd <- read_csv(system.file("extdata", "Draft_vietnam.csv", package = "DataPushR"))
#> Error in read_csv(system.file("extdata", "Draft_vietnam.csv", package = "DataPushR")): could not find function "read_csv"
dpr_create_package(list_data = list(dat_draft = dd), package_name = "Test3", export_folder = getwd())
#> New project 'Test3' is nested inside an existing project '/Users/hathawayj/git/byuidss/DataPushR/docs/reference/', which is rarely a good idea.
#> Error: User input required, but session is not interactive. #> Query: Do you want to create anyway?