According to the answer to this question, you can save the “foo” data frame in R using the save () function as follows:
save(foo,file="data.Rda")
Here is the "df" data frame:
> str(df) 'data.frame': 1254 obs. of 2 variables $ text : chr "RT @SchmittySays: I love this 1st grade #science teacher from #Duluth http://t.co/HWDYFnIyqV #NSTA15 #AlbertEinstein #inspirat"| __truncated__ "RT @KVernonBHS: @smrtgrls would love Stellar Girls. Empowering female scientists rocks! #NSTA15 http://t.co/1ZU0yjVF67" "RT @leducmills: Leaving #SXSWedu to go straight to #NSTA15. There should be some sort of arbitrary conference-hopper social med"| __truncated__ "RT @KRScienceLady: Congrats to a wonderful colleague who helped #ngss Bcome reality, Stephen Pruitt, Distinguished Service to "| __truncated__ ... $ group: Factor w/ 2 levels "narst","nsta": 2 2 2 2 2 2 2 2 2 2 ...
It seems he will save a fine:
> save(df, file = "~/downloads/df.Rda")
But only the name of the saved object is obtained:
> df1 <- load("~/downloads/df.Rda") > str(df1) chr "df"
I tried the saveRDS () function suggested in another answer to the same question that was referenced above, which worked fine, but I would like to know why save () does not work.
source share