Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 xts 或NULL. 我想NULL从环境中删除所有内容。有没有我可以使用的功能eapply来实现这一点?
NULL
eapply
rm( list=names( which( sapply(globalenv(),is.null) # or .GlobalEnv ) ) )
如果不是全局环境,可以使用envirswitch inrm并将环境名称包裹在getenv()调用sapply中
envir
rm
getenv()
sapply