[R] reading Excel file

From: Utkarsh Singhal <utkarshs_at_ambaresearch.com>
Date: Tue, 25 Mar 2008 19:30:18 +0530

Hi R,  

I have an excel file in which the third column is "date" and others are "character" and "numeric".

Number of columns are 12  

If I use this to read the file in R: x = read.xls("D:\\file.xls")  

The problem is that my date column is read in julian dates.  

So I am using:                           x = read.xls("D:\\file.xls",
colClasses= c(rep("character",2),"isodate",rep("character",9)))  

But what can I do in case I don't know the number of columns in my file??  

I mean is there any way I can specify the colClass of only third column and for other columns it can take the default classes??               



This e-mail may contain confidential and/or privileged i...{{dropped:13}}

R-help_at_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. Received on Tue 25 Mar 2008 - 14:56:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 26 Mar 2008 - 01:30:23 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.

list of date sections of archive