source("https://raw.githubusercontent.com/Flavjack/inti/master/pkgdown/favicon/docs.r")
GerminaR is a platform base in open source package to calculate and graphic the main germination indices in R. GerminaR include a web application called “GerminQuant for R” for interactive analysis.
```{=html}
Analysis for the germination experiment can follow a routine. The functions will de explain according to the data set included in the GerminaR package: "*prosopis*". 1. Install and load the GerminaR package. Load the "*prosopis*" dataset on your session. In case of using another dataset, you can load your own data and proceed according to the following script: ```r # Install packages and dependencies library(GerminaR) library(dplyr) # load data fb <- prosopis %>% mutate(across(c(nacl, temp, rep), as.factor)) # Prosopis data set fb %>% head(10) %>% kable(caption = "Prosopis dataset")
# germination analysis (ten variables) gsm <- ger_summary(SeedN = "seeds" , evalName = "D" , data = fb ) # Prosopis data set processed gsm %>% head(10) %>% mutate(across(where(is.numeric), ~round(., 2))) %>% kable(caption = "Function ger_summary performe ten germination indices")
## Germination Percentage (GRP) # analysis of variance av <- aov(grp ~ nacl*temp + rep, data = gsm) # mean comparison test mc_grp <- ger_testcomp(aov = av , comp = c("temp", "nacl") , type = "snk" ) # data result mc_grp$table %>% kable(caption = "Germination percentage mean comparision") # bar graphics for germination percentage grp <- mc_grp$table %>% fplot(data = . , type = "bar" , x = "temp" , y = "grp" , group = "nacl" , ylimits = c(0, 120, 30) , ylab = "Germination ('%')" , xlab = "Temperature" , glab = "NaCl (MPa)" , error = "ste" , sig = "sig" , color = F ) grp
## Mean Germination Time (MGT) # analysis of variance av <- aov(mgt ~ nacl*temp + rep, data = gsm) # mean comparison test mc_mgt <- ger_testcomp(aov = av , comp = c("temp", "nacl") , type = "snk") # data result mc_mgt$table %>% kable(caption = "Mean germination time comparison") # bar graphics for mean germination time mgt <- mc_mgt$table %>% fplot(data = . , type = "bar" , x = "temp" , y = "mgt" , group = "nacl" , ylimits = c(0,10, 1) , ylab = "Mean germination time (days)" , xlab = "Temperature" , glab = "NaCl (MPa)" , sig = "sig" , error = "ste" , color = T ) mgt
You can add at each plot different arguments as the standard error, significance of the mean test, color, labels and limits. The resulted graphics are performed for publications and allows to insert math expression in the titles.
The cumulative analysis of the germination allows to observe the evolution of the germination process, being able to be expressed as the percentage of germination or with the relative germination.
# data frame with percentage or relative germination in time by NaCl git <- ger_intime(Factor = "nacl" , SeedN = "seeds" , evalName = "D" , method = "percentage" , data = fb ) # data result git %>% head(10) %>% kable(caption = "Cumulative germination by nacl factor") # graphic germination in time by NaCl nacl <- git %>% fplot(data = . , type = "line" , x = "evaluation" , y = "mean" , group = "nacl" , ylimits = c(0, 110, 10) , ylab = "Germination ('%')" , xlab = "Day" , glab = "NaCl (MPa)" , color = T , error = "ste" ) nacl
# data frame with percentage or relative germination in time by temperature git <- ger_intime(Factor = "temp" , SeedN = "seeds" , evalName = "D" , method = "percentage" , data = fb) # data result git %>% head(10) %>% kable(caption = "Cumulative germination by temperature factor") # graphic germination in time by temperature temp <- git %>% fplot(data = . , type = "line" , x = "evaluation" , y = "mean" , group = "temp" , ylimits = c(0, 110, 10) , ylab = "Germination ('%')" , xlab = "Day" , glab = "Temperature" , color = F ) temp
As the function fplot()
is build using ggplot2 [@R-ggplot2]. You can add more arguments for modify the graphics adding +
.
library(ggplot2) git <- ger_intime(Factor = "temp" , SeedN = "seeds" , evalName = "D" , method = "percentage" , data = fb ) ggplot <- git %>% fplot(data = . , type = "line" , x = "evaluation" , y = "mean" , group = "temp" , ylimits = c(0, 110, 10) , ylab = "Germination ('%')" , xlab = "Day" , glab = "Temperature" , color = T ) + scale_x_continuous(n.breaks = 10, limits = c(0, 11)) ggplot
if(!file.exists("files/pkgs.bib")){write_bib(c(.packages()),'files/pkgs.bib')}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.