[R] recode problem - unexplained values

Richard M. Heiberger rmh at temple.edu
Thu Sep 28 06:28:34 CEST 2006


I can propose a strategy.

This example shows that there are different types of blanks when you
look at character data.

    as.character(c("", " ", "  ", "   "))

Your test for "" found only one of them.

Look at the data as read.csv produces it.  That will probably give you
some clues.

mydata <- read.csv("filename")

mydata

as.character(mydata)




Rich



More information about the R-help mailing list