[R-sig-eco] R-sig-ecology Digest, Vol 10, Issue 2

T. Avery trevor.avery at acadiau.ca
Fri Jan 2 15:49:29 CET 2009


Hi Mujeeb,
One of your data rows has 20 elements when it should (according to your 
message) 17 elements (columns). With a small dataset, just carefully go 
over the data. I find it is best to save data into a text file with 
either comma delimiter or tab delimiters. I suspect you saved from Excel 
to a text file. In some cases Excel adds a few columns to some data if 
you had used columns at the end of your data while entering into Excel 
and subsequently deleted them. Another trick is to highlight a series of 
columns in Excel (like 50 just to make sure) and delete the columns 
(just not the data, but right clikc and delete) and do that for a bunch 
of rows too. That will remove those cells that may have been written to 
and then their data deleted.

I get this issue all the time the first time students try to import data 
from Excel.

cheers,
trevor


> Today's Topics:
>
>    1. PCA (mujeeb rahman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 1 Jan 2009 19:15:27 +0530
> From: "mujeeb rahman" <mujeebrahmanp at gmail.com>
> Subject: [R-sig-eco] PCA
> To: r-sig-ecology at r-project.org
> Message-ID:
> 	<ac3840600901010545w4edc4c38sefac5d3dab262609 at mail.gmail.com>
> Content-Type: text/plain
>
> Hi..
> During PCA in ade4TkGUI, the following error message is shown.
>
> *Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
>   line 1 did not have 20 elements*
> **
> what i can do in this matter. My data (soil fauna abundance) with 17 colmns
> and 60 rows.
>
> Thanking you
>
> Mujeeb Rahman
> KFRI, Peechi, Kerala
> India
>
> 	[[alternative HTML version deleted]]
>
>
>
>
>



More information about the R-sig-ecology mailing list