R/data_create.R

Defines functions data_create

Documented in data_create

#' Creates a data folder
#'
#' @param raw if you would like a "data-raw" folder, specify TRUE
#' @param cleaned if you woud like a "data-cleaned" folder, specify TRUE
#'
#' @return
#' @export
#' @importFrom here here
#'
data_create <- function(raw = FALSE, cleaned = FALSE){

  #Creates data folder
  dir.create(here::here("data"),recursive = TRUE)


  if(raw == TRUE){
    #Creates a data folder with data-raw and data
    dir.create(here::here("data", "data-raw"),recursive = TRUE)
  }

  if(cleaned == TRUE){
    #Creates a data-cleaned subfolder
    dir.create(here::here("data", "data-cleaned"),recursive = TRUE)
  }

}
wesley4546/filecreateR documentation built on March 10, 2020, 12:09 a.m.