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 at 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 at
yahoo.com
>
> On Monday, 5 October 2020, 08:11:48 am GMT+2, Mir Md. Abdus Salam
<mir.salam at 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 at 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 at 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.