[R-sig-eco] NMDS vegan

ssefick ssefick at gmail.com
Mon Oct 25 21:25:59 CEST 2010


Try saving as a csv.  This has worked for me in the past.  And, maybe
explicitly set the NAs as something.  Maybe NA in the raw data.
HTH

Stephen

On Mon, 2010-10-25 at 14:47 -0400, Soumi Ray wrote:
> Hi Roman,
> 
> here is the output:
> 
> nmds <-read.table ('nmds.txt', header=T, row.names=1)
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
>   line 12 did not have 5 elements
> 
> 
> Soumi
> 
> 
> On Mon, Oct 25, 2010 at 2:10 PM, Soumi Ray <soumiray74 at gmail.com> wrote:
> 
> > Hi listers,
> >
> > I am trying to run NMDS in vegan package. I have a species dataset - with
> > columns as species and rows as variables. All my data are 0/1
> > (presence/absence). My data has missing values. I saved my data in txt file
> > and the missing values are blank spaces. I am using the syntax:
> > <nmds <-read.table ('nmds.txt', header=T, rows.names=1, sep="\t")
> > <nmds.mds.alt <- metaMDS (nmds, distance="bray", k=2, autotransform=FALSE)
> >
> > But it is showing me the error:
> > Error in distfun(comm, method = distance, ...) :
> >   NA/NaN/Inf in foreign function call (arg 1)
> > In addition: Warning message:
> > In distfun(comm, method = distance, ...) :
> >   you have empty rows: their dissimilarities may be meaningless in method
> > bray
> >
> > Could anyone kindly let me know where am I going wrong? I admit i am new to
> > R, trying to self tutor myself.
> >
> > Thank you,
> >
> > Regards,
> >
> > Soumi
> >
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list