Skip to content

Commit

Permalink
Fixes #135
Browse files Browse the repository at this point in the history
  • Loading branch information
spsanderson committed Nov 8, 2024
1 parent 0e2e467 commit b3545f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ NULL
#' @rdname rand_walk_column_names
#'
#' @export
rand_walk_column_names <- function(.rand_data, .dim_names) {
rand_walk_column_names <- function(.rand_data, .dim_names, .num_sims, .t) {
# Set column names
rand_steps <- stats::setNames(.rand_data, .dim_names)
rand_steps <- purrr::map(rand_steps, \(x) dplyr::as_tibble(x)) |>
Expand All @@ -588,14 +588,13 @@ 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
walk_number = factor(.num_sims),
step_number = 1:.t
) |>
dplyr::bind_cols(rand_steps)

return(rand_steps)
}
}
2 changes: 1 addition & 1 deletion man/rand_walk_column_names.Rd

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

0 comments on commit b3545f7

Please sign in to comment.