From 14f5b5a9e3f3a03c3c95ee67c26e66b070185986 Mon Sep 17 00:00:00 2001 From: "Steven Paul Sanderson II, MPH" Date: Thu, 1 Aug 2024 11:00:03 -0400 Subject: [PATCH 1/3] Update 00_global_variables.R --- R/00_global_variables.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/00_global_variables.R b/R/00_global_variables.R index bcace92..928b2a0 100644 --- a/R/00_global_variables.R +++ b/R/00_global_variables.R @@ -1,5 +1,5 @@ globalVariables( names = c( - "walk_number","x","y","value","name" + "walk_number","x","y","value","name", "cum_sum","cum_prod" ) ) From da832ce28c8eeeada0d8502a92c82bb778ecf106 Mon Sep 17 00:00:00 2001 From: "Steven Paul Sanderson II, MPH" Date: Thu, 1 Aug 2024 11:00:07 -0400 Subject: [PATCH 2/3] Update gen-brown-motion-geometric.R --- R/gen-brown-motion-geometric.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/gen-brown-motion-geometric.R b/R/gen-brown-motion-geometric.R index f3b0ce3..49324c2 100644 --- a/R/gen-brown-motion-geometric.R +++ b/R/gen-brown-motion-geometric.R @@ -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 From d12644a8b905606813c146b302afde2eedf0a2e7 Mon Sep 17 00:00:00 2001 From: "Steven Paul Sanderson II, MPH" Date: Thu, 1 Aug 2024 11:00:11 -0400 Subject: [PATCH 3/3] Update gen-brown-motion.R --- R/gen-brown-motion.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/gen-brown-motion.R b/R/gen-brown-motion.R index f279d64..aa3b326 100644 --- a/R/gen-brown-motion.R +++ b/R/gen-brown-motion.R @@ -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 ----