Learn R Programming

rlist (version 0.2.2)

list.save: Save a list to a file

Description

Save a list to a file

Usage

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

Arguments

x
The list to save
file
The file for output
type
The type of output which is by default determined by file extension
...
Additional parameters passed to the output function

Value

  • x will be returned.

Examples

Run this code
x <- lapply(1:5,function(i) data.frame(a=i,b=i^2))
list.save(x,"list.rdata")
list.save(x,"list.yaml")
list.save(x,"list.json")

Run the code above in your browser using DataLab