#' Prints pairwise data over time from a data frame of sequence data
#' @param seq_data A data frame that contains a list of sequences
#' @return A ggplot with the pairwise data over time
#' @importFrom magrittr "%>%"
#' @export
plot_pairwise_data <- function(seq_data)
{
pairwise_dist_data <- seq_data %>%
tidyr::unite(seq1, seq2, col="comparing", sep=" and ")
p <- ggplot2::ggplot(data = pairwise_dist_data,
ggplot2::aes(x=time, y=seq_dist, colour=comparing))
p <- p + ggplot2::geom_step()
p <- p + ggplot2::labs(x = "time (in 1M years)", y = "sequence distance",
title = "Comparing sequence distances over time using the K80 model for mutations")
return(p)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.