list.save: Save a list to a file

View source: R/list.save.R

list.saveR Documentation

Save a list to a file

Description

Save a list to a file

Usage

list.save(x, file, type = tools::file_ext(file), ...)

Arguments

x

The list to save

file

The file for output

type

The type of output which, by default, is determined by file extension. Currently supports RData, RDS, JSON, YAML.

...

Additional parameters passed to the output function

Value

x will be returned.

Examples

## Not run: 
x <- lapply(1:5,function(i) data.frame(a=i,b=i^2))
list.save(x, 'list.rds')
list.save(x, 'list.rdata')
list.save(x, 'list.yaml')
list.save(x, 'list.json')

## End(Not run)

renkun-ken/rlist documentation built on March 16, 2023, 8:25 p.m.