Re: [R] RODBC and NULL values

From: Mark Wardle <mark_at_wardle.org>
Date: Tue 17 Oct 2006 - 10:11:20 GMT

Mark Wardle wrote:

> ...
> Is this because my ODBC driver is not returning the correct values for
> RODBC to parse? Is there anyway of debugging this (the intricacies of
> ODBC are beyond my skill) and is my only alternative to store a
> non-valid number in the database (999?) and use my query or R to remove
> those datapoints afterwards?
> ...
>
Actually, it appears that the Actual ODBC driver isn't returning the data properly. I've just tested it using Excel and it returns zeros for NULLs. Wasn't able to use iodbctest as it got very confused and tried to connect to a MySQL database (which I don't have). There is nothing RODBC can magic to fix this. It's a bit odd, as I use Filemaker to export data via raw SQL commands against the ODBC driver, and that does cope with NULLs, but it appears fetching, at least with Excel and RODBC, does not.

I was just going to try installing "Rdbi" to see whether that has better luck, but I can't access CRAN this morning. Hopefully the "403 Forbidden" message will be temporary!

So unless anyone knows a better alternative, I shall have to store nonsense values rather than NULLs in the database (or fix it within the SELECT query as a quick hack solution instead).

Best wishes,

Mark

-- 
Dr. Mark Wardle
Clinical research fellow and Specialist Registrar in Neurology,
C2-B2 link, Cardiff University, Heath Park, CARDIFF, CF14 4XN. UK

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue Oct 17 20:24:50 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 17 Oct 2006 - 11:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.