[R-sig-eco] package FD--unexpected singular species results?
Etienne Laliberté
etiennelaliberte at gmail.com
Thu Apr 15 22:27:37 CEST 2010
Dear Sarah,
Thanks for your interest in FD. As the posting guide says
(http://www.r-project.org/posting-guide.html)
If the question relates to a contributed package, e.g., one
downloaded from CRAN, try contacting the package maintainer
first.
That would be me in that case. Or write a message / bug request on the
R-Forge page http://r-forge.r-project.org/projects/fdiversity/
You understand sing.sp correctly. What you've identified is a bug. I've
now added it to:
https://r-forge.r-project.org/tracker/?atid=1895&group_id=465&func=browse
(which is the preferred way of listing bugs).
Unfortunately I can't guarantee that I'll fix the bug quickly at this
stage, because I'm trying to finish my PhD thesis in a mad rush before
our second baby arrives in 3 weeks. In the meantime, if you want to have
a look at the code behind dbFD
https://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/FD/R/dbFD.R?rev=2&root=fdiversity&view=markup
and try to identify what's wrong and let me know I'd greatly appreciate.
But please take this off r-sig-ecology; there is no need to tell the
whole world about my incompetence.
Cheers
Etienne
Le jeudi 15 avril 2010 à 12:00 +0200,
r-sig-ecology-request at r-project.org a écrit :
> Send R-sig-ecology mailing list submissions to
> r-sig-ecology at r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> or, via email, send a message with subject or body 'help' to
> r-sig-ecology-request at r-project.org
>
> You can reach the person managing the list at
> r-sig-ecology-owner at r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-ecology digest..."
>
>
> Today's Topics:
>
> 1. package FD--unexpected singular species results? (Sarah Berke)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 14 Apr 2010 12:28:27 -0500
> From: Sarah Berke <skberke at gmail.com>
> To: r-sig-ecology at r-project.org
> Subject: [R-sig-eco] package FD--unexpected singular species results?
> Message-ID:
> <p2webcfe7821004141028hf5812d78jeb8d24dff8e9912a at mail.gmail.com>
> Content-Type: text/plain
>
> Hello R-Ecologists,
>
> I am working with the dbFD function of the FD package to analyze some
> functional community data, and I'm confused about the value of sing.sp in
> the output. Basically, the number of functionally singular species
> (sing.sp) equals the raw number of species (nbsp) for every site in my
> community matrix. However, I know for a fact that many sites have species
> with identical functional classifications, which in this case are all
> categorical (there is 1 continuous variable, but I get sing.sp = nbsp
> regardless of whether the continuous variable is included or excluded).
>
> If two species have identical functional classifications, then shouldn't
> they be functionally singular? Or is sing.sp calculated in some
> non-intuitive way, perhaps along the lines of taxonomic distinctness? Or
> does sing.sp just not work for categorical data?
>
> I suspect that I am simply confused about what sing.sp means, in which case
> this is really more an ecology question than an R question per se. I have
> not found anything in the help files or the FD documentation or the
> literature that explains how sing.sp is calculated, does anyone here know?
> It's certainly possible that something in my code is wrong, or that this is
> a bug in FD, so I hope that someone on this list can shed light on the
> issue.
>
> Here is a simplified example showing what I mean (this is similar to my data
> in that functional categories are nominal and the community matrix has only
> presence/absence data)
>
> fd <- matrix (c("a","b","c","d", "a","b","c","d",
> "b","c","d","a", "c","d","b","a"), byrow = TRUE, nrow=4, ncol=4)
> rownames (fd) <- c("spA", "spB", "spC", "spD") # species
> colnames (fd) <- c("F1", "F2", "F3", "F4") # functional categories
>
> fd # note that spA and spB are functionally identical
>
> comm <- matrix (c(1,0,1,0, 1,0,1,0, 0,1,1,0, 0,1,0,1), nrow=4, ncol=4)
> rownames (comm) <- c("site1", "site2", "site3", "site4")
> colnames (comm) <- c("spA", "spB", "spC", "spD")
>
> comm # note that site 1 has only spA and spB, so I'd expect it to
> # have sing.sp = 0 (no singular species, or perhaps 1
> # if it means the site has 1 type of species??)
>
> require (FD)
> ex1 <- dbFD (fd, comm, w.abun = FALSE, corr="cailliez", clust.type="ward")
> ex1 # site 1 comes out with nbsp = sing.sp = 2, which is surprising
>
> Any explanations / insight / advice would be greatly appreciated!
>
> Many thanks,
> Sarah
> University of Chicago
>
> [[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
>
>
> End of R-sig-ecology Digest, Vol 25, Issue 8
> ********************************************
--
Etienne Laliberté
================================
School of Forestry
University of Canterbury
Private Bag 4800
Christchurch 8140, New Zealand
Phone: +64 3 366 7001 ext. 8365
Fax: +64 3 364 2124
www.elaliberte.info
More information about the R-sig-ecology
mailing list