[R] missing values in csv file

Adrian Dușa dusa.adrian at unibuc.ro
Wed Feb 17 14:01:26 CET 2016


On Wed, Feb 17, 2016 at 12:04 PM, Jan Kacaba <jan.kacaba at gmail.com> wrote:

> In my original data a csv file I have missing values. If I use read.table
> the missing values are replaced by NAs.
>

That is the normal way of dealing with missing values, in R.


Is it possible to get object where missing values aren't replaced with NAs?
> Is it possible to replace NAs with empty space?
>

It is possible to replace the NAs with empty space, but nobody would
recommend that because your variable will be coerced to a character mode.
If the other values are numbers, you won't be able to compute any numerical
measures.
Try to accept that NA is there for a reason, in R.

I hope this helps,
Adrian

-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
Romania

	[[alternative HTML version deleted]]



More information about the R-help mailing list