dpr_export: Export csv files to other file formats as defined @param...

Description Usage Arguments Examples

View source: R/dpr_export.R

Description

Export csv files to other file formats as defined @param object is a character string of the csv file or an R data.frame.

Usage

1
2
3
4
5
6
7
dpr_export(
  object = NULL,
  export_format = NULL,
  export_folder,
  details = TRUE,
  readme = NULL
)

Arguments

export_format

is a character vector of formats to convert. Defaults to ".rds". Potential file types are .xlsx, .rds, .sav, .dta, .sas7bdat, and .json

export_folder

is the folder where the exported data will be placed. In this folder the a subfolder will be created for each csv file name and selected export_format file types will be created in the folder.

details

If TRUE then information is printed to screen during the process. Default is TRUE.

readme

is the data summary that describes the data. Accepts a text string describing the provenance.

Examples

1
2
3
4
5
6
dd <- read_csv(system.file("extdata", "Draft_vietnam.csv", package = "DataPushR"))
tempf <- fs::file_temp("Draft_vietnam_-_", ext = "csv")
write_csv(dd, tempf)
dpr_export(tempf, export_format = c(".rds", ".xlsx", ".sav", ".dta", ".csv", ".json", ".sas7bdat"),
export_folder=getwd())
dpr_export(dd, export_format=c(".rds",".xlsx",".sav",".dta",".csv", ".json", ".sas7bdat"), export_folder=getwd())

BYUIDSS/DataPushR documentation built on June 1, 2020, 11:58 p.m.