Skip to content

Commit

Permalink
Removed new pipe |> to pass automatic inspections on old systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
prdm0 committed Apr 14, 2024
1 parent 75b68c7 commit a485077
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
20 changes: 10 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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)
```
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
```
Expand Down Expand Up @@ -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"))
```
Expand Down Expand Up @@ -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()
Expand All @@ -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)
```
Expand Down
Binary file modified man/figures/README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions vignettes/accept_reject.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
```
Expand All @@ -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"))
```
Expand Down
4 changes: 2 additions & 2 deletions vignettes/inspect.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down

0 comments on commit a485077

Please sign in to comment.