This reports documents the construction of Community Weighted Means (CWMs) and Variance (CWVs), complementing species composition data from sPlot 3.0 and Plant functional traits from TRY 5.0.
Functional Traits were received by [Jens Kattge](jkattge@bgc-jena.mpg.de) on Jan 21, 2020.
There are `r nrow(try.species)` individual observations from `r nrow(try.species %>% distinct(Species))` distinct species in `r nrow(try.species %>% distinct(Genus))` distinct genera.
\newline \newline
## Attach resolved names from Backbone
```{r}
try.species.names <- try.allinfo %>%
dplyr::select(Species, Genus) %>%
left_join(Backbone %>%
dplyr::select(Name_sPlot_TRY, Name_short) %>%
rename(Species=Name_sPlot_TRY),
by="Species") %>%
dplyr::select(Species, Name_short, Genus)
```
After attaching resolved names, TRY data contains information on `r try.species.names %>% distinct(Name_short) %>% nrow()`.
\newline
Check for how many of the species in sPlot, trait information is available in TRY.
```{r}
sPlot.species <- DT2 %>%
distinct(species)
sPlot.in.TRY <- sPlot.species %>%
filter(species %in% (try.species.names %>%
distinct(Name_short) %>%
pull(Name_short)))
##check match when considering taxa resolved ONLY at genus level
```
Out of the `r nrow(sPlot.species)` standardizes species names in sPlot 3.0, `r nrow(sPlot.in.TRY)` (`r round(nrow(sPlot.in.TRY)/nrow(sPlot.species)*100,1)`%) also occur in TRY 5.0.
## Calculate species and genus level trait means and sd
```{r}
#create string to rename traits
col.to <- trait.legend %>%
filter(available==T) %>%
pull(short)
col.from <- trait.legend %>%
filter(available==T) %>%
mutate(traitcode=paste0("X", traitcode)) %>%
pull(traitcode)
## Calculate species level trait means and sd.
try.species.means <- try.species.names %>%
dplyr::select(Species) %>%
bind_cols(try.individuals0 %>%
rename_at(col.from, .funs=function(x) col.to) %>%
dplyr::select(-X1)) %>%
group_by(Species) %>%
left_join(x={.} %>%
summarize(n=n()),
y={.} %>%
summarize_at(.vars=vars(StemDens:LeafWaterCont ),
.funs=list(mean=~mean(.), sd=~sd(.))),
by="Species") %>%
dplyr::select(Species, n, everything())
## Calculate genus level trait means and sd.
try.genus.means <- try.species.names %>%
dplyr::select(Genus) %>%
bind_cols(try.individuals0 %>%
rename_at(col.from, .funs=function(x) col.to) %>%
dplyr::select(-X1)) %>%
group_by(Genus) %>%
left_join(x={.} %>%
summarize(n=n()),
y={.} %>%
summarize_at(.vars=vars(StemDens:LeafWaterCont ),
.funs=list(mean=~mean(.), sd=~sd(.))),
by="Genus") %>%
dplyr::select(Genus, n, everything())
```
The average number of observations per species and genus is `r round(mean(try.species.means$n),1)` and `r round(mean(try.genus.means$n),1)`, respectively. As many as `r sum(try.species.means$n==1)` species have only one observation (`r sum(try.genus.means$n==1)` at the genus level).
Match taxa based on species, if available, or Genus (when rank_correct==Genus)
Calculate CWMs and CWV, as well as plot coverage statistics (proportion of total cover for which trait info exist, and proportion of species for which we have trait info)