How to save a DataFrame in R??

0 votes
I have made a Data Frame in R which is not so big but takes times to build, I want to save this as a file which I can load again in R?
Apr 20, 2018 in Data Analytics by DataKing99
• 8,100 points
275 views

1 answer to this question.

0 votes

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")
answered Apr 20, 2018 by DeepCoder786
• 1,700 points

Related Questions In Data Analytics

0 votes
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,140 points
96 views
0 votes
1 answer

How to limit output of a dataframe in R?

For randomly sampling a row/cell where a ...READ MORE

answered Apr 18, 2018 in Data Analytics by kappa3010
• 2,010 points
32 views
0 votes
1 answer

How to import and clean a text file into dataframe in R?

You can use readLines() or read.table() depending ...READ MORE

answered Jul 16 in Data Analytics by anonymous
6 views
0 votes
1 answer
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,700 points
41 views
0 votes
1 answer

How to spilt a column of a data frame into multiple columns

it is easily achievable by using "stringr" ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,700 points
54 views
0 votes
1 answer

How to sort a data frame by columns in R?

You can just use the order function ...READ MORE

answered Apr 10, 2018 in Data Analytics by darklord
• 6,140 points
74 views
0 votes
1 answer

How to replace NA values in a dataframe with Zero's ?

It is simple and easy: df1<-as.data.frame(matrix(sample(c(NA, 1:10), 100, ...READ MORE

answered Apr 10, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
90 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,700 points
78 views
0 votes
2 answers

How to write lines to a text file in R?

sink("outfile.txt") cat("hello") cat("\n" ...READ MORE

answered May 24 in Data Analytics by anonymous
1,177 views