Re: [R] problem with read.table

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Thu 25 Aug 2005 - 21:15:27 EST


> Hi All
>
> recently i faced an unknown problem while reading the data.
> Can someone help me in understanding why this happened.
>
> I have .txt file containing X, Y, Z variables. I used the command

Please show at least 2 lines of your data.

>
> > a <- read.table("filename", header=TRUE)

Are you sure, that a looks correct? (= have you set the correct seperator in read.table with option sep= )

Best regards,
Matthias

> after reading the file i am able to view it by tryping a. but
> i am unable to access the variables in a, by giving the command a$X.
>
> > a$X
> > NULL
>
> this is the output it was showing. However the same i am able
> to access by giving a[[1]]. i tried changing the mode by
> issuing command a <- as.data.frame(a). But situation remains the same.
>
> look forward for experts suggestion on this.
>
> rgds
>
> snvk
>
> ______________________________________________
> 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
>



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 Thu Aug 25 21:20:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:56 EST