Skip to content

Commit

Permalink
Merge pull request #58 from spsanderson/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
spsanderson authored Aug 1, 2024
2 parents 8f461fc + d12644a commit f22f0bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/00_global_variables.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
globalVariables(
names = c(
"walk_number","x","y","value","name"
"walk_number","x","y","value","name", "cum_sum","cum_prod"
)
)
4 changes: 3 additions & 1 deletion R/gen-brown-motion-geometric.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ geometric_brownian_motion <- function(.num_walks = 25, .n = 100,
dplyr::select(name, t, value) |>
purrr::set_names("walk_number", "x", "y") |>
dplyr::mutate(walk_number = factor(walk_number, levels = 1:num_sims)) |>
dplyr::arrange(walk_number, x)
dplyr::arrange(walk_number, x) |>
rand_walk_helper(.value = initial_value) |>
dplyr::select(-cum_sum, -cum_prod)
}

attr(res, "n") <- .n
Expand Down
4 changes: 3 additions & 1 deletion R/gen-brown-motion.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ brownian_motion <- function(.num_walks = 25, .n = 100, .delta_time = 1,
dplyr::select(name, t, value) |>
purrr::set_names("walk_number", "x", "y") |>
dplyr::mutate(walk_number = factor(walk_number, levels = 1:num_sims)) |>
dplyr::arrange(walk_number, x)
dplyr::arrange(walk_number, x) |>
rand_walk_helper(.value = initial_value) |>
dplyr::select(-cum_sum, -cum_prod)
}

# Return ----
Expand Down

0 comments on commit f22f0bb

Please sign in to comment.