Skip to content
Prev 1804 / 398506 Next

character vectors in data.frames

Lorenz Gygax <lgygax at access.unizh.ch> writes:
Use I(). Like this:
X
1 a
2  
3  
4
[1] "a" ""  ""  "" 
attr(,"class")
[1] "AsIs"

And yes, the behaviour that data.frame converts character to factor
unless requested otherwise is weird, but Splus compatible.