Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Nov 2, 2023
1 parent c8b7332 commit 6a8d51a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/class-worksheet.R
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,12 @@ wbWorksheet <- R6::R6Class(

out <- NULL
for (i in seq_len(nrow(col_df))) {
z_i <- col_df[i, ]

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)
z <- col_df[i, ]
keys <- seq.int(z$min, z$max)

out_tmp <- z[rep(1L, length(keys)), ]
out_tmp$key <- keys
out <- rbind(out, out_tmp)
}

# merge and convert to character, remove key
Expand Down

0 comments on commit 6a8d51a

Please sign in to comment.