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"
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"