R/GRgetValues.R

Defines functions GRgetValues

Documented in GRgetValues

#' GR values
#'
#' Given a SummarizedExperiment object created by \code{\link{GRfit}},
#' this function returns a table of the original data (in the form of 
#' "Case A") with columns for GR values and relative cell counts.
#'
#' @param fitData a SummarizedExperiment object, generated by the GRfit 
#' function.
#'
#' @return A table with GR values and relative cell counts
#' @author Nicholas Clark
#' @details
#' Given a SummarizedExperiment object created by \code{\link{GRfit}},
#' this function returns a table of the original data (in the form of 
#' "Case A") with columns for GR values and relative cell counts. This is 
#' simply a convenient accessor function, equivalent to 
#' \code{as.data.frame(metadata(fitData)[[1]])}.
#' @seealso To create the object needed for this function, see
#' \code{\link{GRfit}}.
#' @examples
#' # Load Case A (example 1) input
#' data("inputCaseA")
#' head(inputCaseA)
#' # Run GRfit function with case = "A"
#' output1 = GRfit(inputData = inputCaseA,
#' groupingVariables = c('cell_line','treatment'))
#' GRvalues = GRgetValues(output1)
#' head(GRvalues)
#' \dontrun{View(GRvalues)}
#' @export

GRgetValues <- function(fitData) {
  return(as.data.frame(metadata(fitData)[[1]]))
}
uc-bd2k/GRmetrics documentation built on Nov. 11, 2020, 4:10 p.m.