R/HTSCluster-internal.R

Defines functions myprobafxn myfxn myloopfxn

.myloopfxn <- function(k, lambda, w.mat, s.mat, r, n, cols) {
	lambda.mat <- matrix(rep(rep(lambda[,k], times = r), each = n),
		nrow = n, ncol = cols)
	return(w.mat * s.mat * lambda.mat)
}
.myfxn <- function(var1, var2) {
	tmp <- var1 * log(var1/var2) + var2 - var1
	index <- which(var1 == 0)
	tmp[index] <- var2[index]
	rowSums(tmp)
}
.myprobafxn <- function(k, y, pi, mean) {
	pi[k] * exp(rowSums(dpois(y, mean[[k]], log=T)))
}

Try the HTSCluster package in your browser

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

HTSCluster documentation built on May 31, 2017, 2:48 a.m.