ea2fd5f6 |
|
c5eb2060 |
rcModelPLM <- function(y,row.effects=NULL, input.scale=NULL){
|
ea2fd5f6 |
if (!is.matrix(y))
stop("argument should be matrix")
PsiCode <- 0
PsiK <- 1.345
|
3dc33f44 |
if (is.null(row.effects)){
|
c5eb2060 |
.Call("R_rlm_rma_default_model",y,PsiCode,PsiK,input.scale,PACKAGE="preprocessCore")
|
3dc33f44 |
} else {
if (length(row.effects) != nrow(y)){
stop("row.effects parameter should be same length as number of rows")
}
if (abs(sum(row.effects)) > 10*.Machine$double.eps){
stop("row.effects should sum to zero")
}
|
c5eb2060 |
.Call("R_rlm_rma_given_probe_effects",y,as.double(row.effects),PsiCode,PsiK,input.scale,PACKAGE="preprocessCore")
|
3dc33f44 |
}
|
ea2fd5f6 |
}
|
c5eb2060 |
rcModelWPLM <- function(y, w, row.effects=NULL, input.scale=NULL){
|
ea2fd5f6 |
if (!is.matrix(y))
stop("argument should be matrix")
if (is.vector(w)){
if (length(w) != prod(dim(y))){
stop("weights are not correct length")
}
} else if (is.matrix(w)){
if (!all(dim(w) == dim(y))){
stop("weights should be same dimension as input matrix")
}
}
if (any(w < 0)){
stop("weights should be no negative")
}
PsiCode <- 0
|
3dc33f44 |
PsiK <- 1.345
if (is.null(row.effects)){
|
c5eb2060 |
.Call("R_wrlm_rma_default_model",y,PsiCode,PsiK,as.double(w),input.scale,PACKAGE="preprocessCore")
|
3dc33f44 |
} else {
if (length(row.effects) != nrow(y)){
stop("row.effects parameter should be same length as number of rows")
}
if (abs(sum(row.effects)) > 10*.Machine$double.eps){
stop("row.effects should sum to zero")
}
|
c5eb2060 |
.Call("R_wrlm_rma_given_probe_effects",y,as.double(row.effects),PsiCode,PsiK,as.double(w),input.scale,PACKAGE="preprocessCore")
|
3dc33f44 |
}
|
ea2fd5f6 |
}
rcModelMedianPolish <- function(y){
if (!is.matrix(y))
stop("argument should be matrix")
PsiCode <- 0
PsiK <- 1.345
.Call("R_medianpolish_rma_default_model",y,PACKAGE="preprocessCore")
}
|