tags:

views:

90

answers:

1

I am using read.csv to import a file that contains some columns with empty cells. I need these cells to remain empty and not contain any values.

However, an NA is getting added everytime I import. I have tried variations of na.strings (like na.strings="NULL" or na.strings="") to no avail.

Is there a simple way to force the observations to remain empty?

Any advice is appreciated.

Thanks,

Jason

+1  A: 

After the import, try this:

x[is.na(x)] <- c("") ## Refills NA with blank character.

This converts the column to character but if you already have mixed strings I imagine it already is.

Brandon Bertelsen
Thank you, this is very helpful.
analyticsPierce