加载调用opencpu的rda结果时使用哪种环境?

时间:2019-06-03 07:47:18

标签: opencpu

如果我在R会话中加载从opencpu服务器(wget http://localhost:8004/ocpu/tmp/x06d7d8204080b2/R/.val/rda )中检索到的rda,我看不到环境中出现'.val'

以下是说明问题的代码:

# Load the RData retrieved from opencpu and check in which environment it has been loaded
load("./rda",envir = globalenv()) 
pryr::where(".val") # returns '<environment: R_GlobalEnv>'

# load another RData that contains a variable called 'model'
load("./another_rda.rda",envir = globalenv())
pryr::where("model") # returns '<environment: R_GlobalEnv>'

# Check the content of the current environment  
ls() # DOES NOT CONTAIN '.val' !! 

# Check the content of the environment containing '.val'...just to make sure we didn't miss anything  
ls(envir = pryr::where(".val")) # DOES NOT CONTAIN '.val' !!!!

# Is '.val' available from the current environment
.val # YES, it is!!...how come?

0 个答案:

没有答案