Check species with conflicting `Taxon group` information and fix manually.
Check species with conflicting `Taxon group` information and fix manually.
```{r, eval=F}
```{r, eval=T}
#check for conflicts in attribution of genera to Taxon groups
#check for conflicts in attribution of genera to Taxon groups
conflict <- DT1 %>%
DT1 %>%
filter(!is.na(Name_short)) %>%
filter(!is.na(Name_short)) %>%
dplyr::select(Genus, `Taxon group`) %>%
filter(!is.na(`Taxon group`)) %>%
filter(!is.na(`Taxon group`)) %>%
distinct(Name_short, `Taxon group`) %>%
mutate(Genus=word(Name_short,1)) %>%
dplyr::select(Genus, `Taxon group`) %>%
distinct() %>%
distinct() %>%
group_by(Genus) %>%
group_by(Genus) %>%
summarize(n=n()) %>%
summarize(n=n()) %>%
filter(n>1) %>%
filter(n>1) %>%
arrange(desc(n)) %>%
arrange(desc(n))
pull(Genus)
```
```
Manually fix some known problems in `Taxon group` attribution. Some list of taxa (e.g., `lichen.genera`, `mushroom.genera`) derive from the `Backbone`.
Manually fix some known problems in `Taxon group` attribution. Some lists of taxa (e.g., `lichen.genera`, `mushroom.genera`) were defined when building the `Backbone`.
Delete all records of fungi, and use lists of genera to fix additional problems. While in the previous round the matching was done on the resolved Genus name, here the match is based on the unresolved Genus name.
Delete all records of fungi, and use lists of genera to fix additional problems. While in the previous round the matching was done on the resolved Genus name, here the match is based on unresolved Genus names.
Fix some errors. There are some plots where only p\\a information is available (`Cover code`=="x"), but have zeros in the field `Cover %`. Consider this as presence\\absence and transform `Cover %` to 1.
Fix some errors. There are some plots where only p\\a information is available (`Cover code`=="x"), but have zeros in the field `Cover %`. Consider this as presence\\absence and transform `Cover %` to 1.
...
@@ -329,6 +333,29 @@ DT1 <- DT1 %>%
...
@@ -329,6 +333,29 @@ DT1 <- DT1 %>%
pull(PlotObservationID))),
pull(PlotObservationID))),
values=1))
values=1))
```
```
For all plot-layer combinations where only p\\a information is available (`Cover code`=="x"), and all the entries of the field `Cover % == 1`. Consider this as presence\\absence and transform `Ab_scale` to "pa". This is done to avoid confusion with plots where `Cover code=="x"` but "x" has to be intended as a class in the cover scale used. For p\\a plots, replace the field `Cover %` with 0, and assign the value 1 to the field `x_`.
Transform abundances to relative abundance, on a layer by layer basis. For consistency with the previous version of sPlot, this field is called `Relative cover`.
Transform abundances to relative abundance. For consistency with the previous version of sPlot, this field is called `Relative cover`.
*Watch out* - Even plots with p\\a information are transformed to relative cover.
*Watch out* - Even plots with p\\a information are transformed to relative cover.