[Rd] Typeof for character vector in dataframe returns integer

Gregor Kastner gregor.kastner at wu.ac.at
Wed Apr 2 08:43:10 CEST 2014


Hi Sandip,

> Sorry for the wrong interpretation. So how to avoid that ? I mean how to
> forcefully make it character vector ?

As indicated by Joshua, ?data.frame will show you the way:

df <- data.frame(gender, age, stringsAsFactors = FALSE)
 
Best,
/g



More information about the R-devel mailing list