[Mboost-commits] r711 - pkg/mboostPatch/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Apr 20 18:39:40 CEST 2013
Author: thothorn
Date: 2013-04-20 18:39:40 +0200 (Sat, 20 Apr 2013)
New Revision: 711
Modified:
pkg/mboostPatch/R/bl.R
pkg/mboostPatch/R/bmrf.R
Log:
use isTRUE instead of identical
Modified: pkg/mboostPatch/R/bl.R
===================================================================
--- pkg/mboostPatch/R/bl.R 2013-04-20 16:00:39 UTC (rev 710)
+++ pkg/mboostPatch/R/bl.R 2013-04-20 16:39:40 UTC (rev 711)
@@ -189,7 +189,7 @@
stop("variable names and knot names must be the same")
if (is.list(boundary.knots)) if(!all(names(boundary.knots) %in% nm))
stop("variable names and boundary.knot names must be the same")
- if (!identical(center, FALSE) && cyclic)
+ if (isTRUE(center) && cyclic)
stop("centering of cyclic covariates not yet implemented")
ret <- vector(mode = "list", length = length(nm))
names(ret) <- nm
@@ -269,7 +269,7 @@
if (vary != "" && ncol(by) > 1){ # build block diagonal penalty
suppressMessages(K <- kronecker(diag(ncol(by)), K))
}
- if (!identical(args$center, FALSE)) {
+ if (isTRUE(args$center)) {
tmp <- attributes(X)[c("degree", "knots", "Boundary.knots")]
center <- match.arg(as.character(args$center),
choices = c("TRUE", "differenceMatrix", "spectralDecomp"))
@@ -346,7 +346,7 @@
if (vary != "" && ncol(by) > 1){ # build block diagonal penalty
suppressMessages(K <- kronecker(diag(ncol(by)), K))
}
- if (!identical(args$center, FALSE)) {
+ if (isTRUE(args$center)) {
### L = \Gamma \Omega^1/2 in Section 2.3. of Fahrmeir et al.
### (2004, Stat Sinica), always
L <- eigen(K, symmetric = TRUE, EISPACK = FALSE)
Modified: pkg/mboostPatch/R/bmrf.R
===================================================================
--- pkg/mboostPatch/R/bmrf.R 2013-04-20 16:00:39 UTC (rev 710)
+++ pkg/mboostPatch/R/bmrf.R 2013-04-20 16:39:40 UTC (rev 711)
@@ -97,7 +97,7 @@
data = mf)[, 2]
X <- X * by
}
- if (!identical(args$center, FALSE)) {
+ if (isTRUE(args$center)) {
### L = \Gamma \Omega^1/2 in Section 2.3. of Fahrmeir et al.
### (2004, Stat Sinica)
SVD <- eigen(K, EISPACK = FALSE)
More information about the Mboost-commits
mailing list