R - Dump

> Procedural Languages > R

1 - Snippet

df=data.frame(a=1:2,b=4:5)
x="Nico"
dump(c("df","x"),file="data.R")
rm(df,x)
source("data.R")
df

The dump function will create a R script that you can call with source

  a b
1 1 4
2 2 5
x
[1] "Nico"
lang/r/dump.txt ยท Last modified: 2017/02/12 21:02 by gerardnico