Skip to content

Commit 8350116

Browse files
Merge pull request #41 from m-muecke/concatenation
refactor: remove unnecessary concatenation
2 parents 22c3a68 + 912d96e commit 8350116

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

R/FDboost.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ FDboost <- function(formula, ### response ~ xvars
456456
### save formula of FDboost before it is changed
457457
formulaFDboost <- formula
458458

459-
tf <- terms.formula(formula, specials = c("c"))
459+
tf <- terms.formula(formula, specials = "c")
460460
trmstrings <- attr(tf, "term.labels")
461461
equalBrackets <- NULL
462462
if(length(trmstrings) > 0){

R/crossvalidation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ plot.validateFDboost <- function(x, riskopt=c("mean", "median"),
12481248
c(min(c(0, ylim[1] * ifelse(ylim[1] < 0, 2, 0.5))),
12491249
riskMean[paste(mOptMean)]), lty = 2)
12501250
legend("topright", legend=paste(c(mOptMean)),
1251-
lty=c(2), col=c("black"))
1251+
lty=2, col="black")
12521252

12531253
}
12541254

@@ -1261,7 +1261,7 @@ plot.validateFDboost <- function(x, riskopt=c("mean", "median"),
12611261
riskMedian[paste(mOptMedian)]), lty = 2)
12621262

12631263
legend("topright", legend=paste(c(mOptMedian)),
1264-
lty=c(2), col=c("black"))
1264+
lty=2, col="black")
12651265
}
12661266

12671267
}

R/methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ coef.FDboost <- function(object, raw = FALSE, which = NULL,
10501050
if(!is.matrix(predHelp)){
10511051
X <- predHelp
10521052
}else{
1053-
X <- if(any(trm$get_names() %in% c("ONEtime")) ||
1053+
X <- if(any(trm$get_names() %in% "ONEtime") ||
10541054
any(class(object)=="FDboostScalar")){ # effect constant in t
10551055
predHelp[,1]
10561056
}else{

R/utilityFunctions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @export
1313
o_control <- function(k_min=20, rule=2, silent=TRUE, cyclic=FALSE, knots=NULL) {
1414
RET <- list(k_min=k_min, rule=rule, silent=silent, cyclic=cyclic, knots=knots)
15-
class(RET) <- c("offset_control")
15+
class(RET) <- "offset_control"
1616
RET
1717
}
1818

0 commit comments

Comments
 (0)