RMySQL
RMySQL copied to clipboard
dbColumnInfo() should not return factors
> foo <- dbColumnInfo(mysql, "mytable")
> str(foo)
'data.frame': 32 obs. of 4 variables:
$ name : Factor w/ 32 levels "somecolumnname",..: 5 2 9 6 7 1 11 10 3 17 ...
$ Sclass: Factor w/ 3 levels "character","double",..: 2 2 1 1 2 1 2 2 2 2 ...
$ type : Factor w/ 6 levels "BIGINT","BLOB/TEXT",..: 1 1 6 2 4 6 5 5 5 1 ...
$ length: int 10 10 765 -1 4 150 2 2 2 10 ...
In RMySQL 0.10.8, the columns $name
, $Sclass
and $type
are factors, but they'd be more manageable as character vectors. For example, factors makes it difficult to bind the resulting data frames together.