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?
+3
A:
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 ...
rcs
2010-07-28 11:07:15
Where can I find that?
waanders
2010-07-28 11:23:51
http://cran.r-project.org/src/contrib/RODBC_1.3-2.tar.gz, File R/TypeInfo.R, Line 41
rcs
2010-07-28 11:30:23
Thanks. But I'm using Windows, my C:\Program Files\R\R-2.10.1\library\RODBC directory doesn't contains TypeInfo.R. Is there no example on the net?
waanders
2010-07-28 11:56:36
You have to download the source package from the link above to view the source of `TypeInfo.R`
rcs
2010-07-28 12:26:36
@rcs, fantastic answer. I love that you pulled from the source and then gave a reference to where in the source it came from. That's excellent.
JD Long
2010-07-28 15:26:01