knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of gghisse
is to provide additional ways to visualize results from hisse
family models (HiSSE objects)
The development version can be installed from from GitHub with:
# install.packages("devtools") devtools::install_github("discindo/gghisse")
A CRAN submission is forthcoming.
To see the main functionality and example code, visit the Shiny web application: https://diatom.shinyapps.io/hisse-web/
library("gghisse") data("diatoms") processed_hisse <- gghisse::h_process_recon(hisse_recon=diatoms$cid4_recon) hisse_rates_plot <- gghisse::h_scatterplot( processed_recon=processed_hisse, parameter="turnover")
As gghisse
is built on top of ggplot2
, modifications to gghisse
plots are easy with the familiar ggplot
functions. For example, changing X axis tick labels:
hisse_rates_plot + scale_x_discrete(breaks=c(0,1), labels=c("plankton", "benthos"))
Or changing the position of the legend
hisse_rates_plot + scale_x_discrete(breaks=c(0,1), labels=c("plankton", "benthos")) + theme(legend.position="top")
Or using expressions (for Greek letters) in the axis labels
hisse_rates_plot + scale_x_discrete(breaks=c(0,1), labels=c("plankton", "benthos")) + theme(legend.position="top") + labs(y=expression(paste(tau, "=", lambda, "+", mu))) + theme(axis.text.y=element_text(size=15))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.