#' Extract comparision labels from a MSstats group comparision result
#' @description Accessor function for the ComparisonResult$Label component of objects returned by \code{\link[MSstats]{groupComparison}}
#' @details \code{\link[MSstats]{groupComparison}} returns a complex, but primitive object. Accordingly, there are not accessor function available. This function allows controlled retrivial.
#' @param x MSstats group comparision result as generated by \code{\link[MSstats]{groupComparison}}
#'
#' @return This function returns a character vector containing all available labels.
#' @export
#'
#' @examples get.comparison.labels(sample.data)
get.comparison.labels <- function(x){
stopifnot(is.MSstats_gcr(x))
as.character(levels(x$ComparisonResult$Label))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.