list_csv: Export mapping each dataframe in a list to a corresponding...

Description Usage Arguments Source See Also Examples

Description

Export mapping each dataframe in a list to a corresponding .csv file.

Usage

1
list_csv(lst, dir, prefix = NULL)

Arguments

lst

A list of dataframes.

dir

Character; the directory where the files will be saved.

prefix

Character; a prefix to add to the file names.

Source

Adapted from an article by Jenny Bryan (https://goo.gl/ah8qkX).

See Also

Other general functions to export data: list_df

Examples

1
2
3
4
5
6
7
8
lst <- list(df1 = data.frame(x = 1), df2 = data.frame(x = 2))

# Saving the output to a temporary file
output <- tempdir()
list_csv(lst, output, prefix = "myfile-")

# Look inside the output directory to confirm it worked
dir(output, pattern = "myfile")

forestgeo/fgeo.misc documentation built on June 23, 2019, 6:26 p.m.