Replacing data in a .Rdata file

Is there a way to replace the table in the .Rdata file with another? I can edit it with the edit (x) command, but it will take a huge amount of time; Also, I did not find a way to add lines to it.

+4
source share
1 answer

I think you need to read some intro to R tutorials.

A .Rdata file is usually a saved session and can contain any number of β€œthings”, scalars, vectors, data.frames, lists, functions, etc. I assume that you have a data file that was read in R in data.frame and save it in a .Rdata file. You can load the .Rdata file with load("....Rdata") , then you can "replace" your table (data frame) by loading another from above if that is what you want to do, therefore, assuming that it is called dat, dat <- read.csv("new_data.csv", ...) , and then save the session again, save.image("....Rdata") . I took a lot of things though ...

+8
source

All Articles