| combineData {HELP} | R Documentation |
Calculate trimmed and/or weighted means of groups of rows in a given data matrix.
combineData(x, y, w, ...)
x |
a numeric matrix containing the values whose trimmed and/or weighted mean is to be computed. Each column is treated independently. |
y |
a vector describing the discrete groups used to divide the elements of x. If y is missing then all elements of x are handled together. |
w |
a matrix of weights the same dimensions as x giving the weights to use for each element of x. If w is missing then all elements of x are given the same weight. |
... |
Arguments to be passed to methods (see combineData-methods):
trimx according to y. na.rmx and y and z. If FALSE any missing values cause an error.elementAssayData to use for a given ExpressionSet input (default is "exprs") feature.groupfeatureData to use as binning variable (default is NULL). Can be a character matching varLabel or simply an integer indicating which feature to choose. See getFeatures. element.weightAssayData to use for a given ExpressionSet input. If NULL (default), weighting is not performed. feature.weightfeatureData to use as weighting variable (default is NULL). Can be a character matching varLabel or simply an integer indicating which feature to choose. See getFeatures. samples... |
Returns a matrix of combined numerical data, where each row represents the summary of a group of elements from the corresponding column in x.
Each column in data matrix treated separately.
Reid F. Thompson (rthompso@aecom.yu.edu)
combineData-methods, mean, weighted.mean
#demo(pipeline,package="HELP")
x <- 1:100
combineData(x,w=x/100)
weighted.mean(x,w=x/100)
y <- sample(c("a","b","c",1:3),size=100,replace=TRUE)
combineData(cbind(x,x,2*x),y,trim=0.5)
#rm(x,y)