Skip to content

Commit

Permalink
[set_col_width] speedup unfold_cols()
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Nov 2, 2023
1 parent 89ecb3a commit 6dbff57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/class-worksheet.R
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ wbWorksheet <- R6::R6Class(

out <- NULL
for (i in seq_len(nrow(col_df))) {
z <- col_df[i, ]
for (j in seq(z$min, z$max)) {
z$key <- j
out <- rbind(out, z)
}
z_i <- col_df[i, ]

Check warning on line 453 in R/class-worksheet.R

View workflow job for this annotation

GitHub Actions / lint

file=R/class-worksheet.R,line=453,col=1,[trailing_whitespace_linter] Trailing whitespace is superfluous.
z <- z_i[rep(seq_len(nrow(z_i)), length(seq(z_i$min, z_i$max))), ]
z$key <- seq(z_i$min, z_i$max)
out <- rbind(out, z)
}

# merge and convert to character, remove key
Expand Down

0 comments on commit 6dbff57

Please sign in to comment.