Skip to content

Commit f0f382c

Browse files
committed
split renv exercise
closes #21
1 parent 72f5c51 commit f0f382c

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

index.qmd

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,21 +1131,35 @@ C(global cache)
11311131
create an isolated project library
11321132
:::
11331133
1134-
::: small
1135-
1. open your `wtf-fix-paths` project
1136-
2. `install.packages("renv")`
1137-
3. `renv::init()`
1138-
4. `renv::status()`
1139-
5. add `library(parallelly)` to any file in the `wtf-fix-paths/R` directory; save file
1140-
6. `renv::status()`
1141-
7. `install.packages("parallelly")`
1142-
8. `renv::status()`
1143-
9. `renv::snapshot()` (`y` proceed)
1144-
10. remove `library(parallelly)` from the file you added it to; save file
1145-
11. `renv::status()`
1134+
```{.r}
1135+
usethis::create_project("wtf-2024")
1136+
install.packages("renv")
1137+
renv::init()
1138+
renv::status()
1139+
```
1140+
{{< countdown "3:00" >}}
1141+
1142+
## activity
1143+
1144+
::: question
1145+
manage dependencies
11461146
:::
11471147
1148-
{{< countdown "10:00" >}}
1148+
add `library(parallelly)` to any file in the `wtf-2024/R` directory
1149+
1150+
```{.r}
1151+
renv::status()
1152+
install.packages("parallelly")
1153+
renv::status()
1154+
renv::snapshot()
1155+
```
1156+
remove `library(parallelly)` from the file you added it to
1157+
1158+
```{.r}
1159+
renv::status()
1160+
```
1161+
1162+
{{< countdown "5:00" >}}
11491163
11501164
::: notes
11511165
run `.libPaths()` to see what your default package libraries are initialize an renv--you'll see that the environment is now local to the project note the .Rprofile that gets placed into your project, which runs an R script in `renv/activate.R` deactivate the environment and check libPaths() again--it should be back to normal

0 commit comments

Comments
 (0)