From 012f100ecbdd5766d1fa58ad86ca1318f2153ab8 Mon Sep 17 00:00:00 2001 From: Shannon Pileggi Date: Thu, 10 Nov 2022 21:10:06 -0500 Subject: [PATCH] tweaks --- index.html | 42 ++++++++++++++++++++++++++++++++++-------- index.qmd | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 80 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 13b0626..6b291f2 100644 --- a/index.html +++ b/index.html @@ -482,16 +482,42 @@

2. Reset

-

+
+

Session -> Restart R or

  • Ctrl + Shift + F10 (Windows),

  • Cmd + Shift + 0 / Cmd + Shift + F10 (Mac)

+

Tools -> Global Options -> Workspace

+
+
+
+ +
+

Your turn, exercise 00

+

Click here to open the NHS-R RStudio Cloud debugging work space.

+

+
+

In RStudio Cloud, set your Workspace options as shown.

+
+

Tools -> Global Options -> Workspace

+
+
+

+
+
+
+
+
+
+03:00 +
@@ -924,7 +950,7 @@

Your turn, exercise 01

-
+
15:00
@@ -1060,7 +1086,7 @@

Your turn, exercise 02

-
+
07:00
@@ -1134,7 +1160,7 @@

recover example

trace() overview

trace(what = fun, tracer = browser)
is equivalent to

    -
  • inserting broswer() in first line of function

  • +
  • inserting browser() in first line of function

  • debug(fun)

@@ -1173,7 +1199,7 @@

trace() without a specified step


trace(what = colSums, tracer = browser)
is equivalent to

    -
  • inserting broswer() in first line of colSums
    if we had the source code

  • +
  • inserting browser() in first line of colSums
    if we had the source code

  • debug(colSums)

@@ -1239,7 +1265,7 @@

Your turn, exercise 03

-
+
10:00
@@ -1387,7 +1413,7 @@

Your turn, investigating a CRAN package

-
+
03:00
@@ -1432,7 +1458,7 @@

Your turn, investigating source code

Hints on next slides.

-
+
05:00
diff --git a/index.qmd b/index.qmd index 9d2f614..5fdfb4f 100644 --- a/index.qmd +++ b/index.qmd @@ -144,7 +144,9 @@ Restart R, especially when things get weird. . . . - +::: columns +::: {.column width="50%"} + Session -\> Restart R or @@ -152,13 +154,54 @@ Session -\> Restart R or - Cmd + Shift + 0 / Cmd + Shift + F10 (Mac) +::: + +::: {.column width="50%"} `Tools -> Global Options -> Workspace` ![](img/workspace-options.PNG) +::: +::: ::: footer ::: + +## Your turn, exercise 00 + +[Click here to open the NHS-R RStudio Cloud debugging work space.](https://rstudio.cloud/spaces/293870/join?access_code=5lSkhQedDhpg6X-KDU0j433JgYYpIsz1YZaLGXBU){target="_blank"} + + + + +::: question +In RStudio Cloud, set your Workspace options as shown. +::: + +`Tools -> Global Options -> Workspace` + +::: columns +::: {.column width="50%"} +![](img/workspace-options.PNG) +::: +::: + +```{r} +countdown( + minutes = 3, + # Fanfare when it's over + play_sound = TRUE, + # Set timer theme to match solarized colors + color_border = "#FFFFFF", + color_text = "#7aa81e", + color_running_background = "#7aa81e", + color_running_text = "#FFFFFF", + color_finished_background = "#ffa07a", + color_finished_text = "#FFFFFF", + font_size = "2em", + ) +``` + ## 3. Reprex ::: r-fit-text @@ -793,7 +836,7 @@ options(error = NULL) `trace(what = fun, tracer = browser)`
is equivalent to -- inserting `broswer()` in first line of function +- inserting `browser()` in first line of function - `debug(fun)` @@ -828,7 +871,7 @@ untrace(colSums) `trace(what = colSums, tracer = browser)`
is equivalent to -- inserting `broswer()` in first line of `colSums`
if we had the source code +- inserting `browser()` in first line of `colSums`
if we had the source code - `debug(colSums)`