Skip to content

Commit

Permalink
Deploying to gh-pages from @ d118af9 πŸš€
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Jan 14, 2024
1 parent 01d105e commit 26664df
Show file tree
Hide file tree
Showing 52 changed files with 507 additions and 507 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1>Page not found<a class="anchor" aria-label="anchor" href="#page-not-found"><
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Advanced R Exercises</strong>" was written by <a class="text-light" href="https://sites.google.com/site/indrajeetspatilmorality/">Indrajeet Patil</a>. It was last built on 2024-01-07.</p>
<p>"<strong>Advanced R Exercises</strong>" was written by <a class="text-light" href="https://sites.google.com/site/indrajeetspatilmorality/">Indrajeet Patil</a>. It was last built on 2024-01-14.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
10 changes: 5 additions & 5 deletions Conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ rlang::catch_cnd
#> return(NULL)
#> })))
#> }
#> <bytecode: 0x55f2c19fa068>
#> <bytecode: 0x5605664637c0>
#> <environment: namespace:rlang>
```

Expand Down Expand Up @@ -691,7 +691,7 @@ sessioninfo::session_info(include_base = TRUE)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz UTC
#> date 2024-01-07
#> date 2024-01-14
#> pandoc 3.1.8 @ /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────
Expand All @@ -705,15 +705,15 @@ sessioninfo::session_info(include_base = TRUE)
#> compiler 4.3.2 2023-11-01 [3] local
#> datasets * 4.3.2 2023-11-01 [3] local
#> desc 1.4.3 2023-12-10 [1] RSPM
#> digest 0.6.33 2023-07-07 [1] RSPM
#> digest 0.6.34 2024-01-11 [1] RSPM
#> downlit 0.4.3 2023-06-29 [1] RSPM
#> dplyr 1.1.4 2023-11-17 [1] RSPM
#> evaluate 0.23 2023-11-01 [1] RSPM
#> fansi 1.0.6 2023-12-08 [1] RSPM
#> fastmap 1.1.1 2023-02-24 [1] RSPM
#> fs 1.6.3 2023-07-20 [1] RSPM
#> generics 0.1.3 2022-07-05 [1] RSPM
#> glue 1.6.2 2022-02-24 [1] RSPM
#> glue 1.7.0 2024-01-09 [1] RSPM
#> graphics * 4.3.2 2023-11-01 [3] local
#> grDevices * 4.3.2 2023-11-01 [3] local
#> htmltools 0.5.7 2023-11-03 [1] RSPM
Expand All @@ -728,7 +728,7 @@ sessioninfo::session_info(include_base = TRUE)
#> pkgconfig 2.0.3 2019-09-22 [1] RSPM
#> pkgload 1.3.3 2023-09-22 [1] RSPM
#> R6 2.5.1 2021-08-19 [1] RSPM
#> rlang * 1.1.2 2023-11-04 [1] RSPM
#> rlang * 1.1.3 2024-01-10 [1] RSPM
#> rmarkdown 2.25 2023-09-18 [1] RSPM
#> rprojroot 2.0.4 2023-11-05 [1] RSPM
#> sass 0.4.8 2023-12-06 [1] RSPM
Expand Down
6 changes: 3 additions & 3 deletions Control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ sessioninfo::session_info(include_base = TRUE)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz UTC
#> date 2024-01-07
#> date 2024-01-14
#> pandoc 3.1.8 @ /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────
Expand All @@ -258,7 +258,7 @@ sessioninfo::session_info(include_base = TRUE)
#> cli 3.6.2 2023-12-11 [1] RSPM
#> compiler 4.3.2 2023-11-01 [3] local
#> datasets * 4.3.2 2023-11-01 [3] local
#> digest 0.6.33 2023-07-07 [1] RSPM
#> digest 0.6.34 2024-01-11 [1] RSPM
#> downlit 0.4.3 2023-06-29 [1] RSPM
#> evaluate 0.23 2023-11-01 [1] RSPM
#> fastmap 1.1.1 2023-02-24 [1] RSPM
Expand All @@ -274,7 +274,7 @@ sessioninfo::session_info(include_base = TRUE)
#> memoise 2.0.1 2021-11-26 [1] RSPM
#> methods * 4.3.2 2023-11-01 [3] local
#> R6 2.5.1 2021-08-19 [1] RSPM
#> rlang 1.1.2 2023-11-04 [1] RSPM
#> rlang 1.1.3 2024-01-10 [1] RSPM
#> rmarkdown 2.25 2023-09-18 [1] RSPM
#> sass 0.4.8 2023-12-06 [1] RSPM
#> sessioninfo 1.2.2 2021-12-06 [1] RSPM
Expand Down
22 changes: 11 additions & 11 deletions Environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ library(rlang)
e <- env()
e$loop <- e
env_print(e)
#> <environment: 0x5592b255c2e8>
#> <environment: 0x5653c4908508>
#> Parent: <environment: global>
#> Bindings:
#> β€’ loop: <env>
Expand All @@ -51,8 +51,8 @@ The binding `loop` should have the same memory address as the environment `e`:

```r
lobstr::ref(e$loop)
#> β–ˆ [1:0x5592b255c2e8] <env>
#> └─loop = [1:0x5592b255c2e8]
#> β–ˆ [1:0x5653c4908508] <env>
#> └─loop = [1:0x5653c4908508]
```

**Q3.** Create a pair of environments as illustrated by this picture.
Expand All @@ -71,9 +71,9 @@ e2$deloop <- e1

# following should be the same
lobstr::obj_addrs(list(e1, e2$deloop))
#> [1] "0x5592b4bbb1e8" "0x5592b4bbb1e8"
#> [1] "0x5653c6f66620" "0x5653c6f66620"
lobstr::obj_addrs(list(e2, e1$loop))
#> [1] "0x5592b4c08948" "0x5592b4c08948"
#> [1] "0x5653c6fbb9f0" "0x5653c6fbb9f0"
```

**Q4.** Explain why `e[[1]]` and `e[c("a", "b")]` don't make sense when `e` is an environment.
Expand Down Expand Up @@ -300,7 +300,7 @@ fget("mean", inherits = FALSE)
fget("mean", inherits = TRUE)
#> function (x, ...)
#> UseMethod("mean")
#> <bytecode: 0x5592aff915a8>
#> <bytecode: 0x5653c233ea20>
#> <environment: namespace:base>

mean <- 5
Expand Down Expand Up @@ -506,7 +506,7 @@ rlang::caller_env
#> {
#> parent.frame(n + 1)
#> }
#> <bytecode: 0x5592b0ab08d0>
#> <bytecode: 0x5653c2e5d500>
#> <environment: namespace:rlang>
```

Expand Down Expand Up @@ -559,7 +559,7 @@ sessioninfo::session_info(include_base = TRUE)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz UTC
#> date 2024-01-07
#> date 2024-01-14
#> pandoc 3.1.8 @ /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────
Expand All @@ -572,15 +572,15 @@ sessioninfo::session_info(include_base = TRUE)
#> compiler 4.3.2 2023-11-01 [3] local
#> crayon 1.5.2 2022-09-29 [1] RSPM
#> datasets * 4.3.2 2023-11-01 [3] local
#> digest 0.6.33 2023-07-07 [1] RSPM
#> digest 0.6.34 2024-01-11 [1] RSPM
#> downlit 0.4.3 2023-06-29 [1] RSPM
#> dplyr 1.1.4 2023-11-17 [1] RSPM
#> evaluate 0.23 2023-11-01 [1] RSPM
#> fansi 1.0.6 2023-12-08 [1] RSPM
#> fastmap 1.1.1 2023-02-24 [1] RSPM
#> fs 1.6.3 2023-07-20 [1] RSPM
#> generics 0.1.3 2022-07-05 [1] RSPM
#> glue 1.6.2 2022-02-24 [1] RSPM
#> glue 1.7.0 2024-01-09 [1] RSPM
#> graphics * 4.3.2 2023-11-01 [3] local
#> grDevices * 4.3.2 2023-11-01 [3] local
#> highr 0.10 2022-12-22 [1] RSPM
Expand All @@ -597,7 +597,7 @@ sessioninfo::session_info(include_base = TRUE)
#> pkgconfig 2.0.3 2019-09-22 [1] RSPM
#> png 0.1-8 2022-11-29 [1] RSPM
#> R6 2.5.1 2021-08-19 [1] RSPM
#> rlang * 1.1.2 2023-11-04 [1] RSPM
#> rlang * 1.1.3 2024-01-10 [1] RSPM
#> rmarkdown 2.25 2023-09-18 [1] RSPM
#> sass 0.4.8 2023-12-06 [1] RSPM
#> sessioninfo 1.2.2 2021-12-06 [1] RSPM
Expand Down
18 changes: 9 additions & 9 deletions Evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ withr::with_tempdir(
foo()
}
)
#> <environment: 0x564fa1bed6a8>
#> <environment: 0x556694e969e0>
#> Parent: <environment: global>
```

Expand Down Expand Up @@ -250,17 +250,17 @@ q1 <- new_quosure(expr(x), env(x = 1))
q1
#> <quosure>
#> expr: ^x
#> env: 0x564fa1a3e9a0
#> env: 0x556694cebe60
q2 <- new_quosure(expr(x + !!q1), env(x = 10))
q2
#> <quosure>
#> expr: ^x + (^x)
#> env: 0x564fa20915d8
#> env: 0x55669533ac58
q3 <- new_quosure(expr(x + !!q2), env(x = 100))
q3
#> <quosure>
#> expr: ^x + (^x + (^x))
#> env: 0x564fa23500b0
#> env: 0x5566955fd570
```

**A1.** Correctly predicted πŸ˜‰
Expand Down Expand Up @@ -298,7 +298,7 @@ enenv(x)

foo <- function(x) enenv(x)
foo()
#> <environment: 0x564fa32bc708>
#> <environment: 0x55669656a448>
```

---
Expand Down Expand Up @@ -674,7 +674,7 @@ sessioninfo::session_info(include_base = TRUE)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz UTC
#> date 2024-01-07
#> date 2024-01-14
#> pandoc 3.1.8 @ /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────
Expand All @@ -686,13 +686,13 @@ sessioninfo::session_info(include_base = TRUE)
#> cli 3.6.2 2023-12-11 [1] RSPM
#> compiler 4.3.2 2023-11-01 [3] local
#> datasets * 4.3.2 2023-11-01 [3] local
#> digest 0.6.33 2023-07-07 [1] RSPM
#> digest 0.6.34 2024-01-11 [1] RSPM
#> downlit 0.4.3 2023-06-29 [1] RSPM
#> evaluate 0.23 2023-11-01 [1] RSPM
#> fansi 1.0.6 2023-12-08 [1] RSPM
#> fastmap 1.1.1 2023-02-24 [1] RSPM
#> fs 1.6.3 2023-07-20 [1] RSPM
#> glue 1.6.2 2022-02-24 [1] RSPM
#> glue 1.7.0 2024-01-09 [1] RSPM
#> graphics * 4.3.2 2023-11-01 [3] local
#> grDevices * 4.3.2 2023-11-01 [3] local
#> htmltools 0.5.7 2023-11-03 [1] RSPM
Expand All @@ -706,7 +706,7 @@ sessioninfo::session_info(include_base = TRUE)
#> pillar 1.9.0 2023-03-22 [1] RSPM
#> purrr 1.0.2 2023-08-10 [1] RSPM
#> R6 2.5.1 2021-08-19 [1] RSPM
#> rlang * 1.1.2 2023-11-04 [1] RSPM
#> rlang * 1.1.3 2024-01-10 [1] RSPM
#> rmarkdown 2.25 2023-09-18 [1] RSPM
#> sass 0.4.8 2023-12-06 [1] RSPM
#> sessioninfo 1.2.2 2021-12-06 [1] RSPM
Expand Down
10 changes: 5 additions & 5 deletions Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ call_standardise(quote(mean(x = 1:10, , TRUE)))
mean
#> function (x, ...)
#> UseMethod("mean")
#> <bytecode: 0x562fc13895a8>
#> <bytecode: 0x5577d9c40a20>
#> <environment: namespace:base>
```

Expand Down Expand Up @@ -993,7 +993,7 @@ sessioninfo::session_info(include_base = TRUE)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz UTC
#> date 2024-01-07
#> date 2024-01-14
#> pandoc 3.1.8 @ /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────
Expand All @@ -1006,13 +1006,13 @@ sessioninfo::session_info(include_base = TRUE)
#> compiler 4.3.2 2023-11-01 [3] local
#> crayon 1.5.2 2022-09-29 [1] RSPM
#> datasets * 4.3.2 2023-11-01 [3] local
#> digest 0.6.33 2023-07-07 [1] RSPM
#> digest 0.6.34 2024-01-11 [1] RSPM
#> downlit 0.4.3 2023-06-29 [1] RSPM
#> evaluate 0.23 2023-11-01 [1] RSPM
#> fansi 1.0.6 2023-12-08 [1] RSPM
#> fastmap 1.1.1 2023-02-24 [1] RSPM
#> fs 1.6.3 2023-07-20 [1] RSPM
#> glue 1.6.2 2022-02-24 [1] RSPM
#> glue 1.7.0 2024-01-09 [1] RSPM
#> graphics * 4.3.2 2023-11-01 [3] local
#> grDevices * 4.3.2 2023-11-01 [3] local
#> htmltools 0.5.7 2023-11-03 [1] RSPM
Expand All @@ -1027,7 +1027,7 @@ sessioninfo::session_info(include_base = TRUE)
#> pillar 1.9.0 2023-03-22 [1] RSPM
#> purrr 1.0.2 2023-08-10 [1] RSPM
#> R6 2.5.1 2021-08-19 [1] RSPM
#> rlang * 1.1.2 2023-11-04 [1] RSPM
#> rlang * 1.1.3 2024-01-10 [1] RSPM
#> rmarkdown 2.25 2023-09-18 [1] RSPM
#> sass 0.4.8 2023-12-06 [1] RSPM
#> sessioninfo 1.2.2 2021-12-06 [1] RSPM
Expand Down
Loading

0 comments on commit 26664df

Please sign in to comment.