From 215a01a7fde4601f4c49286890cd02ba5ebe8826 Mon Sep 17 00:00:00 2001 From: "J. Hathaway" Date: Mon, 15 Jul 2024 14:45:54 -0600 Subject: [PATCH] Update documentation to use correct argument name (#1123) --- R/reduce.R | 2 +- man/accumulate.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/reduce.R b/R/reduce.R index a131d31c..d491ae1c 100644 --- a/R/reduce.R +++ b/R/reduce.R @@ -471,7 +471,7 @@ seq_len2 <- function(start, end) { #' set_names(paste0("sim", 1:5)) |> #' map(\(l) accumulate(l, \(acc, nxt) .05 + acc + nxt)) |> #' map(\(x) tibble(value = x, step = 1:100)) |> -#' list_rbind(id = "simulation") |> +#' list_rbind(names_to = "simulation") |> #' ggplot(aes(x = step, y = value)) + #' geom_line(aes(color = simulation)) + #' ggtitle("Simulations of a random walk with drift") diff --git a/man/accumulate.Rd b/man/accumulate.Rd index 7057ec90..cfd8c68c 100644 --- a/man/accumulate.Rd +++ b/man/accumulate.Rd @@ -197,7 +197,7 @@ map(1:5, \(i) rnorm(100)) |> set_names(paste0("sim", 1:5)) |> map(\(l) accumulate(l, \(acc, nxt) .05 + acc + nxt)) |> map(\(x) tibble(value = x, step = 1:100)) |> - list_rbind(id = "simulation") |> + list_rbind(names_to = "simulation") |> ggplot(aes(x = step, y = value)) + geom_line(aes(color = simulation)) + ggtitle("Simulations of a random walk with drift")