[R] data error problem

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Mon Oct 5 10:28:22 CEST 2020


Hi Mir,
Without knowing what the data looks like, this is only a guess.
read.table() expects a white space delimiter and if you have a space
in one of your column names it will consider it as two names instead
of one. How many columns do you expect?

Jim

On Mon, Oct 5, 2020 at 6:14 PM Mohammad Tanvir Ahamed via R-help
<r-help using r-project.org> wrote:
>
> Hi, In your data file, the first row does not have an equal number of column like the rest of the row.Check your data file. Specially 1st row.
> Regards.............Tanvir Ahamed    Stockholm, Sweden     |  mashranga using yahoo.com
>
>     On Monday, 5 October 2020, 08:11:48 am GMT+2, Mir Md. Abdus Salam <mir.salam using uef.fi> wrote:
>
>  Dear all,
>
> I need urgent help. I am a new user of R. I got the following error
>
> anovamine<-read.table("spike cu.txt",header=TRUE)
>
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
> line 1 did not have 9 elements
>
> Can anybody please help me to solve this problem why I am getting such kind of error?
>
> Thanks
>
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



More information about the R-help mailing list