[R] How to read unbalanced data from file?

Petr Pikal petr.pikal at precheza.cz
Tue Oct 12 07:01:41 CEST 2004


On 11 Oct 2004 at 11:45, wfang wrote:

> Hi,
>    I tried to read some unbalance data (with different number if rows)
>    
> using x<- read.table("filename", header = true) command, but the
> program refuses to read the table. Could you tell me why this is

Hallo

Your OS, your R version is missing, but having this:

a	b	d	e
1	1	1	1
2	2	2	2
3		3	3
4		4	
5		5	
		6	

read.delim("clipboard")

produces

> mydata<-read.delim("clipboard")
   a  b d  e
1  1  1 1  1
2  2  2 2  2
3  3 NA 3  3
4  4 NA 4 NA
5  5 NA 5 NA
6 NA NA 6 NA

so it ***do not refuse*** to read the data. I do not expect some 
dwarf climbs out from your computer and says he will not read 
your data. Or is he? 

?read.table 

gives you more details about how to read some data.

Cheers
Petr


> happening and how to fix it? I just want to create a ANOVA table.
>    Thanks.
>    Wenyi
> 
> ______________________________________________
> R-help at 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

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list