#' Plot both the experimental data and the model fit.
#'
#' @param data data.frame containing the data and model fit to plot.
#'
#' @return Handle to the plot.
#' @export
#'
#' @examples
plotSim <- function(data) {
p1 <- ggplot2::ggplot(data = data, ggplot2::aes_string(x = 'Time..hr.')) +
ggplot2::geom_line(ggplot2::aes_string(y = 'simG1 / (simG0 + simG1)')) +
ggplot2::geom_step(ggplot2::aes_string(y = 'G1 / (G0 + G1)')) +
ggplot2::ylim(0, 1) + ggplot2::ylab("G1 Percentage") +
ggplot2::xlab("Time (hrs)")
p2 <- ggplot2::ggplot(data = data, ggplot2::aes(x = Time..hr.)) +
ggplot2::geom_line(ggplot2::aes_string(y = 'simG0 + simG1')) +
ggplot2::geom_step(ggplot2::aes_string(y = 'G0 + G1')) +
ggplot2::ylab("Number of Cells") + ggplot2::xlab("Time (hrs)") +
ggplot2::geom_line(ggplot2::aes_string(y = 'simDead'), color = "red") +
ggplot2::geom_step(ggplot2::aes_string(y = 'dead'), color = "red")
return(gridExtra::grid.arrange(p1, p2, nrow = 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.