简体   繁体   English

如何在 R 中读取 .rdata 文件

[英]How to read .rdata file in R

I have a file poly.rdata.我有一个文件 poly.rdata。 Shall I use我要不要用

df <- load(file="..poly.rdata")
head(df)

to load the data?加载数据? But I can't see the data using head(df).但是我用head(df)看不到数据。

head(df)

[1] "poly.data"

Just semove the df <- in your code.只需删除代码中的df <-

load() will load all the objects contained in the .RData file. load()将加载 .RData 文件中包含的所有对象。 This can be multiple variables and dataframes with various names, so you do not need to specify one object name.这可以是具有不同名称的多个变量和数据框,因此您无需指定一个对象名称。

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

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