when do you want to set up new environments in R

后端 未结 3 1137
故里飘歌
故里飘歌 2021-02-19 00:27

per the discussion of R programming styles, I saw someone once said he puts all his custom function into a new environment and attach it. I also remember R environment maybe use

3条回答
  •  情话喂你
    2021-02-19 00:47

    To answer your second question (that you've now deleted), use ls.str, or just access the object in the environment with $:

    .myEnv <- new.env()
    .myEnv$a <- 2
    a <- 1
    str(a)
    ls.str(.myEnv, a)
    str(.myEnv$a)
    

提交回复
热议问题