rrdata

How to read .rdata file in R


I have a file 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)

[1] "poly.data"

Solution

  • Just semove the df <- in your code.

    load() will load all the objects contained in the .RData file. This can be multiple variables and dataframes with various names, so you do not need to specify one object name.