Re: [R] reading Excel file

From: Hans-Peter <gchappi_at_gmail.com>
Date: Tue, 25 Mar 2008 18:14:42 +0100

>
> 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??

Not supported, sorry (I put it on the list).

x = read.xls( "D:\\file.xls", colClasses = c( rep( NA , 2 ),"isodate", rep( NA, 9 ) ) ) should work. But you still have to know the total number of columns. (The pro version does have a xls.info command and/or you could read in just the first row and check its content).

-- 
Regards,
Hans-Peter

	[[alternative HTML version deleted]]

______________________________________________
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 - 17:20:27 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 Tue 25 Mar 2008 - 18: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