Skip to content

Commit

Permalink
squash! Replace 1: with seq_len() (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Jul 30, 2024
1 parent dbc0791 commit fc41299
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/count_nonzero_a.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
count_nonzero_a <- function(x) {
if (length(dim(x)) == 3) {
count1 <- matrix(0, dim(x)[3])
for (ww in 1:dim(x)[3]) {
for (ww in seq_len(dim(x)[3])) {
n <- sum(x[, , ww] != 0)
count1[ww] <- n
}
Expand Down
2 changes: 1 addition & 1 deletion inst/examples/MADMMplasso_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ e <- MASS::mvrnorm(N, mu = rep(0, 6), Sigma = esd)
y_train <- X %*% Beta + pliable + e
y <- y_train

colnames(y) <- c(paste0("y", 1:(ncol(y))))
colnames(y) <- c(paste0("y", seq_len(ncol(y))))
TT <- tree_parms(y)
plot(TT$h_clust)
gg1 <- matrix(0, 2, 2)
Expand Down
2 changes: 1 addition & 1 deletion man/MADMMplasso.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-admm_MADMMplasso_cpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ e <- mvrnorm(N, mu = rep(0, 6), Sigma = esd)
y_train <- X %*% Beta + pliable + e
y <- y_train
colnames(y) <- 1:6
colnames(y) <- c(paste0("y", 1:(ncol(y))))
colnames(y) <- c(paste0("y", seq_len(ncol(y))))
TT <- tree_parms(y)
C <- TT$Tree
CW <- TT$Tw
Expand Down

0 comments on commit fc41299

Please sign in to comment.