[R-sig-eco] fonction spc.pres in labdsv package

Dave Roberts dvrbts at ecology.msu.montana.edu
Fri Apr 26 23:57:53 CEST 2013


Hi Lisa,

    Sorry, I'm several days behind in monitoring the list.  I'm not sure 
I can help without a copy of your data.  Since your dataframe appears to 
have both strings ("i","p",etc) and integers I'm not sure what you're 
getting.  table(unlist(veg)) ignores NAs, although I think vegtrans 
would have warned you about NAs.

    If the data file is too large to send as an attachment (to me, not 
the list), perhaps you could show snippets.  E.g.

 > veg<-read.csv(file=file.choose(),dec=",",sep=";", header=TRUE)
 > any(is.na(veg))
 > veg[1:10,1:10]

and then

 > veg<-read.csv(file=file.choose(),dec=",",sep=";", header=TRUE)
 > any(is.na(newveg))
 > newveg[1:10,1:10]

and then

 > spc.pres<- apply(newveg>0,2,sum)
 > any(is.na(spc.pres))

Dave Roberts


On 04/19/2013 06:49 AM, lisa couet wrote:
> Hi,
>
> I have an issue concerning the fonction spc.pres in package labdsv.
> the message is:
>
> Erreur dans plot.window(...) : 'xlim' nécessite des valeurs finies
> De plus : Messages d'avis :
> 1: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
> 2: In max(x) : aucun argument pour max ; -Inf est renvoyé
> 3: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
> 4: In max(x) : aucun argument pour max ; -Inf est renvoyé
>
> I code:
>
> veg<-read.csv(file=file.choose(),dec=",",sep=";", header=TRUE)
> attach(veg)
>
> ((to change my data into  Braun Blanquet index ))
>
> library(labdsv)
> x<-c("i","p","p1","p2","p3",1,12,13,14,15,21,22,23,24,25,31,32,33,34,35,41,42,43,44,45,51,52,53,54,55)
> y<-c(0.5,3.0,3.0,3.0,3.0,15.0,15.0,15.0,15.0,15.0,37.5,37.5,37.5,37.5,37.5,62.5,62.5,62.5,62.5,62.5,85.0,85.0,85.0,85.0,85.0,97.5,97.5,97.5,97.5,97.5)
> newveg<-vegtrans(veg,x,y)
>
> (( abondance distribution))
>
> ab<- table(unlist(newveg))
>
> ((abondance s'affiche bien)
>
> ((Number of occurrences))
>
> spc.pres<- apply(newveg>0,2,sum)
> plot(sort(spc.pres))
>
> the error message is here.
>
> I have many NA because it is a file where columns are species and row elevation. So when specie is not present, nothing is in the cell.
>
> I hope one of you can help me,
>
>
> kind regards,
> lisa
>
> 	[[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

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts                                     office 406-994-4548
Professor and Head                                      FAX 406-994-3190
Department of Ecology                         email droberts at montana.edu
Montana State University
Bozeman, MT 59717-3460



More information about the R-sig-ecology mailing list