diff --git a/code/04_buildHeader.Rmd b/code/04_buildHeader.Rmd index ad7b3f80f49a19e2bb083b58b600a9d6266eab7e..677793ad715cf3608695644b8dcf1f9dac4b83a7 100644 --- a/code/04_buildHeader.Rmd +++ b/code/04_buildHeader.Rmd @@ -152,7 +152,8 @@ Pfe-o-05- 1707854 ```{r, eval=T} header0 <- header0 %>% filter(!PlotObservationID %in% c(1707776, 1707779:1707782, 1707849, 1707854)) %>% - filter(Dataset != "$Coastal_Borja") + filter(Dataset != "$Coastal_Borja") %>% + filter(Dataset != "$Coastal_Poland") ``` diff --git a/code/06_buildDT.Rmd b/code/06_buildDT.Rmd index 1979e32765363c7a16698fc9de9f36198b3ac509..98fdec79ee18423229cf3677d29964df5d562d09 100644 --- a/code/06_buildDT.Rmd +++ b/code/06_buildDT.Rmd @@ -63,19 +63,25 @@ DT0 <- readr::read_delim("../sPlot_data_export/sPlot_3_0_2_species_test.csv", x_ = col_double() ) ) -nplots <- length(unique(DT0$PlotObservationID)) -nspecies <- length(unique(DT0$`Matched concept`)) + ``` Match plots with those in `header` ```{r} load("../_output/header_sPlot3.0.RData") DT0 <- DT0 %>% filter(PlotObservationID %in% unique(header$PlotObservationID)) + +nplots <- length(unique(DT0$PlotObservationID)) +nspecies <- length(unique(DT0$`Matched concept`)) +# Plots in header but not in DT +empty.plots <- header %>% + filter(!PlotObservationID %in% unique(DT2$PlotObservationID)) %>% + pull(PlotObservationID) ``` -The DT table includes `r nrow(DT0)` species * plot records, across `r nplots` plots. Before taxonomic resolution, there are `r nspecies` species . -\newline +The DT table includes `r nrow(DT0)` species * plot records, across `r nplots` plots. Before taxonomic resolution, there are `r nspecies` species. There are `r length(empty.plots)`. These are plots where the only species reported in Turboveg 3 are not identified (and not in the taxonomic list). Should these be deleted from `header`? +<br> ```{r, echo=F} diff --git a/code/07_buildCWMs.Rmd b/code/07_buildCWMs.Rmd index 99c0eb6063effc18776365b323c204f0b9733863..65064c303366c5a1e8416bc4cfcd5bf3f0c9a468 100644 --- a/code/07_buildCWMs.Rmd +++ b/code/07_buildCWMs.Rmd @@ -412,6 +412,14 @@ CWM <- CWM1 %>% arrange(PlotObservationID) ``` + +```{r, echo=F} +# align to header (to avoid recalculating cached CWMs) +CWM <- CWM %>% + filter(PlotObservationID %in% header$PlotObservationID) +``` + + ### 2.1 Explore CWM output ```{r, echo=F} knitr::kable(CWM %>% diff --git a/code/08_Documentation.Rmd b/code/08_Documentation.Rmd index fe090dcbf08f26bac7dd445a2290c112c63ea5a0..4fec4e56e192d3c3e6034eda8d9fa9c287a663c5 100644 --- a/code/08_Documentation.Rmd +++ b/code/08_Documentation.Rmd @@ -265,7 +265,7 @@ knitr::kable(CWM %>% latex_options = "basic", full_width = F, position = "center") ``` -The CWM table contains `r nrow(CWM)` entries, i.e., the combination between `r CWM %>% distinct(PlotObservationID) %>% nrow()` unique plots, and `r CWM %>% distinct(variable) %>% nrow()`. +The CWM table contains `r nrow(CWM)` entries, i.e., the combination between `r CWM %>% distinct(PlotObservationID) %>% nrow()` unique plots, and `r CWM %>% distinct(variable) %>% nrow()` traits.