This package contains a compilation of compilations of published phytoplankton trait data.
phytotraitr is not available from CRAN.
You can install directly from github with:
# install.packages("devtools") devtools::install_github("andrewdolman/phytotraitr")
library(knitr) library(dplyr) library(tidyr) library(ggplot2) library(phytotraitr)
Each table has a corresponding *_key table with details about each variable. The first three columns of the keys are also found in the help files for each table.
kable(Edwards_nutrient_traits[1:10,1:6], format = "markdown") kable(Edwards_nutrient_traits_key[1:6,], format = "markdown")
p <- Edwards_nutrient_traits %>% filter(system == "freshwater") %>% select(taxon, qmin_p_c, qmax_p_c) %>% gather(Trait, Value, -taxon) %>% filter(complete.cases(Value)) %>% ggplot(aes(x = taxon, y = Value, colour = Trait)) %>% + geom_point(position = position_jitter(width = 0.05)) %>% + coord_flip() %>% + scale_x_discrete(with(Edwards_nutrient_traits_key, Edwards_nutrient_traits_key[`Column name`=="taxon","Variable definition"])) %>% + scale_y_continuous(paste0("[", with(Edwards_nutrient_traits_key, Edwards_nutrient_traits_key[`Column name`=="qmin_p_c","Units"]), "]")) p
The data from the separate publications have not been harmonized - i.e. variable names may differ (e.g. species, Species) and they may use different taxonomy.
sets <- data(package = "phytotraitr") sets <- data.frame(sets[[3]]) %>% select(Item, Title) kable(sets, format = "markdown")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.