1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
rcModelPLMr <- function(y){
if (!is.matrix(y))
stop("argument should be matrix")
PsiCode <- 0
PsiK <- 1.345
.Call("R_plmr_model",y,PsiCode,PsiK,PACKAGE="preprocessCore")
}
rcModelPLMrr <- function(y){
if (!is.matrix(y))
stop("argument should be matrix")
PsiCode <- 0
PsiK <- 1.345
.Call("R_plmrr_model",y,PsiCode,PsiK,PACKAGE="preprocessCore")
}
rcModelPLMrc <- function(y){
if (!is.matrix(y))
stop("argument should be matrix")
PsiCode <- 0
PsiK <- 1.345
.Call("R_plmrc_model",y,PsiCode,PsiK,PACKAGE="preprocessCore")
}
rcModelWPLMr <- function(y, w){
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 non negative")
}
PsiCode <- 0
PsiK <- 1.345
.Call("R_wplmr_model",y,PsiCode,PsiK,as.double(w),PACKAGE="preprocessCore")
}
rcModelWPLMrr <- function(y, w){
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 non negative")
}
PsiCode <- 0
PsiK <- 1.345
.Call("R_wplmrr_model",y,PsiCode,PsiK,as.double(w),PACKAGE="preprocessCore")
}
rcModelWPLMrc <- function(y, w){
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 non negative")
}
PsiCode <- 0
PsiK <- 1.345
.Call("R_wplmrc_model",y,PsiCode,PsiK,as.double(w),PACKAGE="preprocessCore")
}
|