简体   繁体   English

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

[英]regarding reading data information saved in a rda file

For a.rda file, after loading it, except viewing it using Rtudio window, are there any functions that can list all the data information stored in this rda file?对于a.rda文件,加载后,除了使用Rtudio window查看,有没有什么函数可以列出这个rda文件中存储的所有数据信息?

When I want to see what's in an .rda file without loading it into my current environment, I load it into a temp env:当我想查看.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

Not the most efficient way, as it requires that you load the contents before listing them.不是最有效的方法,因为它要求您在列出内容之前加载它们。 I don't think it's easy to look at a raw rda file on-disk and know its contents without loading it in some fashion.我认为在不以某种方式加载它的情况下查看磁盘上的原始rda文件并了解其内容并不容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM