0

I imported a CSV into R to do some reshaping of my data, which had some empty cells. I now have a dataframe in R, and R has assigned the empty cells "NA" values. I want to export the dataframe back to a CSV, but when I use write.csv() it puts NAs into the spreadsheet. How can I export to a CSV without the NAs, so the cells are blank like before?

j400nb
  • 17
  • 5
  • 2
    Hard to say without a code example, but this seems like a duplicate of this question -> https://stackoverflow.com/a/20969552/1745616 so use the parameter `na=""` like in `write.csv(df, file="myfile.csv", na="")` – BdR Dec 20 '21 at 21:33
  • Thanks a lot @BdR ! And pardon--I looked but didn't find that one before. – j400nb Dec 22 '21 at 18:05

0 Answers0