Retrieving rda into a different variable name in…

Retrieving .rda into a different variable name in R

1. Using environment

x <- 1
save(x, file = 'saved_x.rda')
Data.Env <- new.env()
load(file = 'saved_x.rda')
y <- Data.Env$x

2. Using saveRDS, readRDS for a single object

x <- 1
saveRDS(x, file = 'saved_x.rds')
y <- readRDS('saved_x.rds')

By microbe

Like to cook for microorganisms and human. Play football, tennis, and baseball.

Leave a Reply

Your email address will not be published. Required fields are marked *