R/rqcCycleAverageQualityPcaCalc.R

Defines functions rqcCycleAverageQualityPcaCalc

Documented in rqcCycleAverageQualityPcaCalc

#' @describeIn rqcCycleAverageQualityPcaPlot calculates necessary statistics
#' @export
rqcCycleAverageQualityPcaCalc <- function(rqcResultSet)
{
  df <- rqcCycleAverageQualityCalc(rqcResultSet)
  df.wide <- dcast(df, cycle ~ filename, value.var = "quality")
  fit <- prcomp(~ ., data=df.wide[,-1, drop=FALSE])
  return(fit)
}
labbcb/Rqc documentation built on Aug. 2, 2021, 8:43 a.m.