[Rd] colnames argument in sqlFetch backwards? (PR#7355)

From: <bgunter_at_gene.com>
Date: Wed 10 Nov 2004 - 08:09:10 EST


Full_Name: Bert Gunter
Version: 2.0.0 patched
OS: Win2000
Submission from: (NULL) (192.12.78.250)

The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be reversed, at least for .xls files.

## z is a connection to an xls workbook opened by odbcConnectExcel()

> dat<-sqlFetch(z,'SuccessRates',colnames=FALSE)
> dat[1:5,]

  RecID     Name Run  Grams Lost Run (80L)
1    NA Activase 117 839.91              0
2    NA Activase 118 860.52              0
3    NA Activase 119 921.23              0
4    NA Activase  NA     NA              1
5    NA Activase 120 722.62              0

> dat2<-sqlFetch(z,'SuccessRates',colnames=TRUE)
> dat2[1:5,]

  NA Activase 117 839.91 0
2 NA Activase 118 860.52 0
3 NA Activase 119 921.23 0
4 NA Activase  NA     NA 1

5 NA Activase 120 722.62 0
6 NA Activase 121 762.48 0

I note also that the last column, "Lost Run (80L)," was actually TRUE/FALSE and some blanks in the Excel sheet and was silently coerced to numeric. This is no problem, of course, but I wonder if it's the intended behavior and, if so, is it documented?



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 10 08:15:14 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:01:17 EST