R/rowRanksWilc.R

Defines functions rowRanksWilc

Documented in rowRanksWilc

rowRanksWilc <- function(X, cl){
	if(length(cl)!=ncol(X))
		stop("The length of cl must be equal to the number of columns of X.")
	ids <- which(cl == 1)
	Xr <- matrix(0, nrow(X), length(ids))
	for(i in 1:length(ids))
		Xr[, i] <- rowSums(X <= X[, ids[i]])
	Xr
}

Try the siggenes package in your browser

Any scripts or data that you put into this service are public.

siggenes documentation built on Nov. 8, 2020, 6:26 p.m.