R/get_examples.R

Defines functions get_examples

Documented in get_examples

#' Get example CSV files
#' 
#' This function gives access to the CSV files given as demonstrations when
#' using the \code{\link{learn}} function.
#' 
#' @examples
#' get_examples()
#' 
#' @importFrom pins board_local_storage
#'
#' @export

get_examples <- function(){
  datasetPath <- system.file("extdata/", package = "polyglot")
  datasetName <- list.files(path = paste0("", datasetPath, ""))
  datasetAbsolutePath <- paste0(datasetPath, datasetName)
  
  file.copy(datasetAbsolutePath, to = paste0(pins::board_local_storage(), "/", datasetName))
}

Try the polyglot package in your browser

Any scripts or data that you put into this service are public.

polyglot documentation built on July 2, 2020, 4:15 a.m.