diff --git a/R/create_PLANTS.R b/R/create_PLANTS.R index 25a42316ea..74f2b0af3a 100644 --- a/R/create_PLANTS.R +++ b/R/create_PLANTS.R @@ -2,16 +2,14 @@ # #' Create PLANTS Dataset #' -#' @param ... Arguments to `create_*()` function. Only `outpath` supported at this time. -#' @return TRUE if successful +#' @param ... Arguments to `parse_PLANTS()` function. Only `outpath` supported at this time. +#' @return `TRUE` if successful #' @export #' @importFrom data.table fread create_PLANTS <- function(...) { - - args <- list(...) - if (!is.null(args[["outpath"]])) { - outpath <- args[["outpath"]] - } + parse_PLANTS(...) +} +parse_PLANTS <- function(outpath = "inst/extdata", ...) { x <- data.table::fread('https://plants.usda.gov/assets/docs/CompletePLANTSList/plantlst.txt') diff --git a/man/create_PLANTS.Rd b/man/create_PLANTS.Rd index b6f11ab50e..a1e9a079b3 100644 --- a/man/create_PLANTS.Rd +++ b/man/create_PLANTS.Rd @@ -7,10 +7,10 @@ create_PLANTS(...) } \arguments{ -\item{...}{Arguments to `create_*()` function. Only `outpath` supported at this time.} +\item{...}{Arguments to `parse_PLANTS()` function. Only `outpath` supported at this time.} } \value{ -TRUE if successful +`TRUE` if successful } \description{ Create PLANTS Dataset