Skip to content

Commit

Permalink
Merge pull request #134 from spsanderson/spsanderson-patch-2
Browse files Browse the repository at this point in the history
Update helpers.R
  • Loading branch information
spsanderson authored Nov 8, 2024
2 parents 34f4301 + 53268a3 commit 0e2e467
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ NULL
#' @rdname rand_walk_column_names
#'
#' @export

rand_walk_column_names <- function(.rand_data, .dim_names) {
# Set column names
rand_steps <- stats::setNames(.rand_data, .dim_names)
Expand All @@ -589,6 +588,14 @@ rand_walk_column_names <- function(.rand_data, .dim_names) {
rand_steps, \(x) x |>
unlist(use.names = FALSE)) |>
dplyr::as_tibble()


# Combine into a tibble
rand_steps <- dplyr::tibble(
walk_number = factor(num_sims),
step_number = 1:t
) |>
dplyr::bind_cols(rand_steps)

return(rand_steps)
}
}

0 comments on commit 0e2e467

Please sign in to comment.