Learn R Programming

RUVcorr (version 1.4.2)

wcor: Calculate weighted correlations.

Description

wcor returns correlations weighted according to a provided object of class Weights.

Usage

wcor(X, anno, Factor, Weights)

Arguments

X
A matrix of gene expression values.
anno
A dataframe or a matrix containing the annotation of arrays in X.
Factor
A character string corresponding to a column name of anno; this should be the same used to generate Weights.
Weights
An object of class Weights or a list of weights.

Value

wcor returns a matrix.

Examples

Run this code
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1,
250, 100, intercept=FALSE, check.input=FALSE)
anno<-as.matrix(sample(1:5, dim(Y$Y)[1], replace=TRUE))
colnames(anno)<-"Factor"
weights<-findWeights(Y$Y, anno, "Factor")
wcor(Y$Y[,1:5], anno, "Factor", weights)

Run the code above in your browser using DataLab