Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a <- 1
- b <- 1
- save(list = ls(), file = file.path(tempdir(), 'tmp.RData'))
- rm(list =ls())
- load(file.path(tempdir(), 'tmp.RData'))
- ls()
- rm(list =ls())
- library(magrittr)
- # tempdir() %>% file.path("tmp.RData") %>% load(envir = parent.frame(3))
- # ls()
- testFunction <- function()
- {
- tempdir() %>% file.path("tmp.RData") %>% load(envir = parent.frame(3))
- print(ls())
- }
- testFunction2 <- function()
- {
- testFunction()
- print(ls())
- }
- testFunction3 <- function()
- {
- testFunction2()
- print(ls())
- }
- testFunction3()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement