@@ -125,7 +125,7 @@ integrationWeights <- function(X1, xind, id = NULL){
125125
126126 # taking into account missing values
127127 if (anyNA(X1 )){
128- Lneu <- sapply(1 : nrow(X1 ), function (i ){
128+ Lneu <- sapply(seq_len( nrow(X1 ) ), function (i ){
129129 x <- X1 [i ,]
130130
131131 if (! anyNA(x )){
@@ -840,7 +840,7 @@ X_conc <- function(mf, vary, args) {
840840
841841 # # <FIXME> is that line still necessary?
842842 # # important for prediction, otherwise id=NULL and yind is multiplied accordingly
843- if (is.null(id )) id <- 1 : nrow(X1 )
843+ if (is.null(id )) id <- seq_len( nrow(X1 ) )
844844
845845 # # check yind
846846 if (args $ format == " long" && length(yind )!= length(id )) stop(xname , " : Index of response and id do not have the same length" )
@@ -1156,7 +1156,7 @@ X_hist <- function(mf, vary, args) {
11561156 # # <FIXME> is that line still necessary? should it be there in long and wide format?
11571157 # ##### EXTRA LINE in comparison to X_hist
11581158 # # important for prediction, otherwise id=NULL and yind is multiplied accordingly
1159- if (is.null(id )) id <- 1 : nrow(X1 )
1159+ if (is.null(id )) id <- seq_len( nrow(X1 ) )
11601160
11611161 # # check yind
11621162 if (args $ format == " long" && length(yind )!= length(id )) stop(xname , " : Index of response and id do not have the same length" )
@@ -2519,9 +2519,9 @@ bolsc <- function(..., by = NULL, index = NULL, intercept = TRUE, df = NULL,
25192519 if (is.null(index )){
25202520
25212521 if (is.null(weights )){ # # use weights
2522- w <- 1 : nrow(mf )
2522+ w <- seq_len( nrow(mf ) )
25232523 }else {
2524- w <- rep(1 : nrow(mf ), weights )
2524+ w <- rep(seq_len( nrow(mf ) ), weights )
25252525 }
25262526
25272527 temp <- X_olsc(mf [w , , drop = FALSE ], vary ,
@@ -2531,9 +2531,9 @@ bolsc <- function(..., by = NULL, index = NULL, intercept = TRUE, df = NULL,
25312531 }else {
25322532
25332533 if (is.null(weights )){ # # use weights
2534- w <- 1 : nrow(mf [index , , drop = FALSE ])
2534+ w <- seq_len( nrow(mf [index , , drop = FALSE ]) )
25352535 }else {
2536- w <- rep(1 : nrow(mf [index , , drop = FALSE ]), weights )
2536+ w <- rep(seq_len( nrow(mf [index , , drop = FALSE ]) ), weights )
25372537 }
25382538
25392539 temp <- X_olsc(mf = (mf [index , , drop = FALSE ])[w , , drop = FALSE ], vary = vary ,
0 commit comments