Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RODBC sqlSave column types: how determined?

Tags:

r

rodbc

I'm trying to understand how RODBC determines the column types of a newly created (Access) table? The R documentation of sqlSave is very cryptic: "types are selected by consulting arguments varTypes and typeInfo". And no examples for this arguments. Where can I find a better explanation?

like image 613
waanders Avatar asked Jul 28 '10 10:07

waanders


1 Answers

Just look at the sources of the RODBC package.

# from R/TypeInfo.R:
typesR2DBMS <-
    list(MySQL = list(double="double", integer="integer",
         character="varchar(255)", logical="varchar(5)"),
         ACCESS = list(double="DOUBLE", integer="INTEGER",
         character="VARCHAR(255)", logical="varchar(5)"),
         # etc ...
like image 141
rcs Avatar answered Sep 25 '22 05:09

rcs