Skip to content

Commit 66af505

Browse files
avoid assignments
1 parent 3c31188 commit 66af505

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

R/nest.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,15 @@ remove_terminal_token_before_and_after <- function(pd_flat) {
312312
#' @return An integer vector of length spaces_after_prefix, which is either
313313
#' one (if `force_one = TRUE`) or `space_after_prefix` with all values
314314
#' below one set to one.
315+
#' @return
316+
#' Numeric vector indicating the number of spaces.
315317
#' @keywords internal
316318
set_spaces <- function(spaces_after_prefix, force_one) {
317319
if (force_one) {
318-
n_of_spaces <- rep(1, length(spaces_after_prefix))
320+
rep(1, length(spaces_after_prefix))
319321
} else {
320-
n_of_spaces <- pmax(spaces_after_prefix, 1L)
322+
pmax(spaces_after_prefix, 1L)
321323
}
322-
n_of_spaces
323324
}
324325

325326
#' Nest a flat parse table

man/set_spaces.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)