Hi Jeff,

Ah, thanks a lot! Yes, meanwhile I also switched to csv. This still requires 
knowledge about the regional settings (Sys.getlocale), but it's a lot more 
transparent.

 
I'm quite new to R and I must say that stuff like this is eating up a LOT of my 
time. All those invisible data type conversions are driving me nuts. 
StringsAsFactors=F should be the default, for instance.

Cheers!!
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public 
order, irrigation, roads, a fresh water system, and public health, what have 
the 
Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




________________________________
From: Jeff Newmiller <jdnew...@dcn.davis.ca.us>

Sent: Tue, May 3, 2011 10:21:02 AM
Subject: Re: [R] Rodbc quesion: how to reliably determine the data type?

This is not a decision being made by RODBC... it is in the Microsoft ODBC 
driver 
for Excel. If you really want to know more, you can read 
http://www.dicks-blog.com/archives/2004/06/03/external-data-mixed-types/ ...

but the best solution is to take your data out of Excel and only use xls/xlsx 
formats for data output (if at all).
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.



Hello,
>
>How can I tell RODBC to scan all the records of an xls file to determine the  
>data type? If the first n records happen to be empty Rodbc assumes a 
>character,  
>and any numbers are made <NA>. And if, for instance, the first n records 
>contain  
>numbers, and later they also contain characters, those characters  become NA.
>
> Cheers!!
>Albert-Jan
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>All right, but apart from the sanitation, the medicine, education, wine, 
>public  
>order, irrigation, roads, a fresh water system, and public health, what have 
>the 
>
>Romans ever done for us?
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>       [[alternative HTML version deleted]]
________________________________
R-help@r-project.org 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. 
>
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to