[R] Excel to R

From: Bernardo Rangel tura <tura_at_centroin.com.br>
Date: Sun 16 Jul 2006 - 00:50:14 EST

>Hi peolple!

I have a many excel tables with mode than 100 variables. And I want use R to analize that.

But I have a problem, a group of this variables (more than 50) in any table is a factor and other part is a number.

Tha factors variables have tha values enconde this form (1=Yes,2=No and 9 = NA)

Well I use this scripts to import the database

channel <- odbcConnectExcel("f:/teste.xls")
data <- sqlFetch(channel, "Sheet1")

        qw ee

  Min.   :1.000   Min.   :1.000
  1st Qu.:1.000   1st Qu.:1.500
  Median :1.000   Median :2.000
  Mean   :1.333   Mean   :2.429
  3rd Qu.:1.750   3rd Qu.:3.500
  Max.   :2.000   Max.   :4.000
  NA's   :1.000

But qw is a factor (and is colnum type isvtext)

Is possible modify my script for this utcome

 > summary(data)

     qw ee

  1   :4   Min.   :1.000
  2   :2   1st Qu.:1.500
  NA's:1   Median :2.000
           Mean   :2.429
           3rd Qu.:3.500
           Max.   :4.000

Thanks in advance

Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras Rio de Janeiro Brazil

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 Received on Sun Jul 16 00:55:16 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 18 Jul 2006 - 00:16:15 EST.

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