Issues exporting R data frame as csv

I exported data using the write.csv function, but the table gets truncated. The original table has 4,073,561 rows, but the csv file has about 700,000 rows. Please how do I rectify this?

How have you checked the number of rows in the .csv file?

We need reproducible example (reprex)

I just tried exporting a 5,000,000 data.frame to .csv with no problem but it was a very simple one. See the example below.

dat1 <-   data.frame(kk = sample(letters, 5000000, replace = TRUE),
                    zz = sample(1:10, 5000000, replace = TRUE) )


write.csv(dat1, "millions.csv", row.names = FALSE)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.