[英]Modifying Tables in .RData files
I have an .Rdata file that contains a table.我有一个包含表格的 .Rdata 文件。 Is there any way I can edit the file to add a column to the table, and add values to this new column?
有什么方法可以编辑文件以向表中添加一列,并向这个新列添加值? I do not have the original .R file, only the .Rdata file.
我没有原始的 .R 文件,只有 .Rdata 文件。 I'm new to R, so it would be great if I could be given a few pointers.
我是 R 的新手,所以如果我能得到一些指点,那就太好了。 Thanks!
谢谢!
You can load the .RData file using below code您可以使用以下代码加载 .RData 文件
load("/path/data.RData")
And then you can add a new column to this table using然后你可以使用
cbind(data, newColumn)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.