关于读取保存在 rda 文件中的数据信息

对于.rda文件,加载后,除了用Rtudio窗口查看外,有没有什么函数可以列出这个rda文件中存储的所有数据信息?

liqzone 回答:关于读取保存在 rda 文件中的数据信息

当我想查看 .rda 文件中的内容而不将其加载到当前环境中时,我将其加载到临时环境中:

e <- new.env(parent = emptyenv())
load("path/to/file.rda",envir=e)
ls(e)     # shows names of variables stored in it
ls.str(e) # shows a `str` presentation of all variables within it

不是最有效的方法,因为它要求您在列出内容之前加载它们。我认为查看磁盘上的原始 rda 文件并了解其内容而不以某种方式加载它并不容易。

本文链接:https://www.f2er.com/831108.html

大家都在问