How to save a DataFrame in R

666    Asked by BrianKennedy in Python , Asked on Jul 24, 2021

I have made a Data Frame in R which is not so big but takes time to build, I want to save this as a file that I can load again in R?how to save a dataframe in r?

Answered by Aswini Lobo

Suppose your DataFrame is named as df:

write.csv(df,file="exmp.csv")
Then you can load the csv file easily:
read.csv(file="exmp.csv")
Alternate method for this is :
save(df,file="data.Rda")
Now load it by:
load("data.Rda")

Your Answer

Interviews

Parent Categories