Re: [R] Specaccum

From: Sarah Goslee <sarah.goslee_at_gmail.com>
Date: Wed, 20 Feb 2008 08:41:14 -0500

You need to read the help for specaccum to see what it returns. If you want the site and richness components, as in the example you give, you could do:

my.sa <- specaccum(my.data)
write.table(cbind(my.sa$sites, my.sa$richness), "myoutput.csv")

Sarah

On Feb 20, 2008 7:24 AM, Alfonso Pérez Rodríguez <fonsilei_at_iim.csic.es> wrote:
> Hello, I'm trying to obtain a species abundance curve with the function specaccum from vegan package. I've applied this function to my data and I've obtained something like this:
>
> Sites 1.000000 2.000000 3.000000 4.000000 5.0000000 6.0000000 7.00 Richness 6.510000 8.290000 9.150000 9.770000 10.3300000 10.7600000 sd 1.381662 1.350608 1.200799 1.117853 0.9749903 0.9333333 0.90
>
> But the problem is that I want to export this data to an excel file, or a txt file, but I'm not able to do it because I can not asign this values to a data.frame or a matrix or something. When I try to transform in a data frame the program tell me:
>
> Error en as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) :
> cannot coerce class "specaccum" into a data.frame
>
> Then, what can I do? Thank you very much.
>
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Wed 20 Feb 2008 - 13:55:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Feb 2008 - 14:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive