diff --git a/README.Rmd b/README.Rmd index bf51cba..333415a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -79,10 +79,10 @@ simulation <- function(n){ ) } -a <- simulation(25L) |> plot() -b <- simulation(250L) |> plot() -c <- simulation(2500L) |> plot() -d <- simulation(25000L) |> plot() +a <- plot(simulation(25L)) +b <- plot(simulation(250L)) +c <- plot(simulation(2500L)) +d <- plot(simulation(25000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) @@ -110,10 +110,10 @@ simulation <- function(n){ ) } # Inspecting -a <- simulation(n = 250L) |> plot() -b <- simulation(n = 2500L) |> plot() -c <- simulation(n = 25000L) |> plot() -d <- simulation(n = 250000L) |> plot() +a <- plot(simulation(n = 250L)) +b <- plot(simulation(n = 2500L)) +c <- plot(simulation(n = 25000L)) +d <- plot(simulation(n = 250000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) @@ -206,8 +206,8 @@ case_2 <- accept_reject( toc() # Visualizing the results -p1 <- case_1 |> plot() -p2 <- case_2 |> plot() +p1 <- plot(case_1) +p2 <- plot(case_2) plot_grid(p1, p2, nrow = 2L) ``` diff --git a/README.md b/README.md index 700e117..b02e850 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,10 @@ simulation <- function(n){ ) } -a <- simulation(25L) |> plot() -b <- simulation(250L) |> plot() -c <- simulation(2500L) |> plot() -d <- simulation(25000L) |> plot() +a <- plot(simulation(25L)) +b <- plot(simulation(250L)) +c <- plot(simulation(2500L)) +d <- plot(simulation(25000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) ``` @@ -174,10 +174,10 @@ simulation <- function(n){ ) } # Inspecting -a <- simulation(n = 250L) |> plot() -b <- simulation(n = 2500L) |> plot() -c <- simulation(n = 25000L) |> plot() -d <- simulation(n = 250000L) |> plot() +a <- plot(simulation(n = 250L)) +b <- plot(simulation(n = 2500L)) +c <- plot(simulation(n = 25000L)) +d <- plot(simulation(n = 250000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) ``` @@ -289,7 +289,7 @@ case_1 <- accept_reject( xlim = c(0, 10) ) toc() -#> 6.838 sec elapsed +#> 7.294 sec elapsed # Specifying the base probability density function tic() @@ -305,11 +305,11 @@ case_2 <- accept_reject( c = 1.2 ) toc() -#> 2.581 sec elapsed +#> 2.633 sec elapsed # Visualizing the results -p1 <- case_1 |> plot() -p2 <- case_2 |> plot() +p1 <- plot(case_1) +p2 <- plot(case_2) plot_grid(p1, p2, nrow = 2L) ``` diff --git a/man/figures/README-unnamed-chunk-2-1.png b/man/figures/README-unnamed-chunk-2-1.png index a4e0a54..b188725 100644 Binary files a/man/figures/README-unnamed-chunk-2-1.png and b/man/figures/README-unnamed-chunk-2-1.png differ diff --git a/man/figures/README-unnamed-chunk-3-1.png b/man/figures/README-unnamed-chunk-3-1.png index 100572b..6094db1 100644 Binary files a/man/figures/README-unnamed-chunk-3-1.png and b/man/figures/README-unnamed-chunk-3-1.png differ diff --git a/vignettes/accept_reject.Rmd b/vignettes/accept_reject.Rmd index 73c5c76..337c192 100644 --- a/vignettes/accept_reject.Rmd +++ b/vignettes/accept_reject.Rmd @@ -273,10 +273,10 @@ simulation <- function(n){ ) } # Inspecting -a <- simulation(n = 250L) |> plot() -b <- simulation(n = 2500L) |> plot() -c <- simulation(n = 25000L) |> plot() -d <- simulation(n = 250000L) |> plot() +a <- plot(simulation(n = 250L)) +b <- plot(simulation(n = 2500L)) +c <- plot(simulation(n = 25000L)) +d <- plot(simulation(n = 250000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) ``` @@ -300,10 +300,10 @@ simulation <- function(n){ ) } -a <- simulation(25L) |> plot() -b <- simulation(250L) |> plot() -c <- simulation(2500L) |> plot() -d <- simulation(25000L) |> plot() +a <- plot(simulation(25L)) +b <- plot(simulation(250L)) +c <- plot(simulation(2500L)) +d <- plot(simulation(25000L)) plot_grid(a, b, c, d, nrow = 2L, labels = c("a", "b", "c", "d")) ``` diff --git a/vignettes/inspect.Rmd b/vignettes/inspect.Rmd index 3bde5d8..5024506 100644 --- a/vignettes/inspect.Rmd +++ b/vignettes/inspect.Rmd @@ -112,8 +112,8 @@ case_2 <- accept_reject( toc() # Visualizing the results -p1 <- case_1 |> plot() -p2 <- case_2 |> plot() +p1 <- plot(case_1) +p2 <- plot(case_2) plot_grid(p1, p2, nrow = 2L) ```