Skip to contents

A target for exporting a data frame as a csv file.

Usage

tar_csv(dataframe_target, export_path = "exports")

Arguments

dataframe_target

the name of the target that will generate the data frame for export

export_path

the destination path of the exported csv file

Value

A target object for exporting a plot as a png.

Details

The name of the returned target will be the name of the data frame target with the prefix export_. The file name of the exported csv file will be that of the argument provided to dataframe_target.

Examples

if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
  targets::tar_dir({
    targets::tar_script({
      list(
        targets::tar_target(
          iris,
          iris
        ),
        jftargets::tar_csv(iris)
      )
    })
    
    targets::tar_make()
    tar_read(export_iris)
  })
}