[R] data format of x in x <- sqlQuery()

Sukhaswami Malladi smalladi at lexgen.com
Tue Jun 4 23:11:06 CEST 2002


When I read data into an R variable x using RODBC command:

x <- sqlQuery(channel,"select a, b from tabl",as="data frame")   

and view x, I get 3 columns the first one being the index of
the rows in x. 

What options do I use in sqlQuery so as not have the index in x ? 
How do I get rid of the index otherwise.

For some functions like princomp (and boxplot) for example:

> princomp(x)
Error in cov.wt(z) : x must contain finite values only

There is no error for USArrests example data which 
does not have index.

> boxplot(x)
Error in x[floor(d)] + x[ceiling(d)] : non-numeric argument to binary

Thanks in advance for any suggestions
Sukhaswami Malladi

 The contents of this communication are intended only for the addressee and
may contain confidential and/or privileged material. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication and notify the sender.  Opinions, conclusions and other
information in this communication that do not relate to the official
business of my company shall be understood as neither given nor endorsed by

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list