Skip to content

Commit

Permalink
correct browser typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonpileggi committed Jul 25, 2022
1 parent ffef48b commit a88663a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 36 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ <h2>traceback vs rlang functions</h2>
<h2>browser()</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb13" data-code-line-numbers="2"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1"></a>f <span class="ot">&lt;-</span> <span class="cf">function</span>(x) {</span>
<span id="cb13-2"><a href="#cb13-2"></a> <span class="fu">browser</span>(x)</span>
<span id="cb13-2"><a href="#cb13-2"></a> <span class="fu">browser</span>()</span>
<span id="cb13-3"><a href="#cb13-3"></a> x <span class="sc">+</span> <span class="dv">1</span></span>
<span id="cb13-4"><a href="#cb13-4"></a>}</span>
<span id="cb13-5"><a href="#cb13-5"></a></span>
Expand Down Expand Up @@ -914,7 +914,7 @@ <h2>Your turn, exercise 01</h2>
</div>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_62da051a" style="right:0;bottom:0;font-size:2em;" data-audio="true" data-warnwhen="0">
<div class="countdown" id="timer_62df014c" style="right:0;bottom:0;font-size:2em;" data-audio="true" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">15</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
</div>
Expand Down Expand Up @@ -1049,7 +1049,7 @@ <h2>Your turn, exercise 02</h2>
</div>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_62da0273" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_62df00f1" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">07</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
</div>
Expand Down Expand Up @@ -1226,7 +1226,7 @@ <h2>Your turn, exercise 03</h2>
</div>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_62da054c" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_62df0233" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
</div>
Expand Down Expand Up @@ -1373,7 +1373,7 @@ <h2>Your turn, investigating a CRAN package</h2>
</div>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_62da0289" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_62deffa0" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">03</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
</div>
Expand Down Expand Up @@ -1417,7 +1417,7 @@ <h2>Your turn, investigating source code</h2>
<p><em>Hints on next slides.</em></p>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_62da0291" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_62df0057" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
</div>
Expand Down
40 changes: 10 additions & 30 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ execute:

# Agenda


Getting started

Troubleshooting
Expand All @@ -34,8 +33,6 @@ Special cases

Read the source



# Getting started

```{r}
Expand Down Expand Up @@ -106,8 +103,6 @@ Artwork by [\@allison_horst](https://twitter.com/allison_horst).
<https://github.com/allisonhorst/stats-illustrations>
:::



# Troubleshooting

## 1. Search
Expand Down Expand Up @@ -242,7 +237,6 @@ Troubleshooting strategies:
<https://giphy.com/gifs/TreehouseDirect-agent-binky-8UabbehIqkR0akDt1y>
:::


# Moving on

<br>
Expand Down Expand Up @@ -471,7 +465,7 @@ Numbering and ordering differs between `traceback()` and rlang functions.

```{r, eval=FALSE, echo=TRUE, `code-line-numbers`="2"}
f <- function(x) {
browser(x)
browser()
x + 1
}

Expand All @@ -498,8 +492,7 @@ g <- function(x) f(x)
::: columns
::: {.column width="35%"}
Investigate objects
Investigate objects
<br>
Expand All @@ -516,28 +509,19 @@ Control execution
<br>
::: {.small}
| command | operation |
|---------|-------------------------|
| `n` | next statement |
::: small
| command | operation |
|---------|----------------------------------------|
| `n` | next statement |
| `c` | continue (leave interactive debugging) |
| `s` | step into function call |
| `f` | finish loop / function |
| `where` | show previous calls |
| `Q` | quit debugger |
| `s` | step into function call |
| `f` | finish loop / function |
| `where` | show previous calls |
| `Q` | quit debugger |
:::
:::
:::
## Debugging your code
![](img/debugging_yours.svg)
Expand Down Expand Up @@ -948,8 +932,6 @@ countdown(

2. WTF Ch 11.4 Debugging in Rmarkdown documents <https://rstats.wtf/debugging-r-code.html#debugging-in-r-markdown-documents>



## Piped expressions

<br>
Expand All @@ -974,8 +956,6 @@ gives trimmed tracebacks when using pipes

- Matt Dray 2019 blog post [Fix leaky pipes in R](https://www.rostrum.blog/2019/04/07/fix-leaky-pipes/)



## Warnings

<br>
Expand Down

0 comments on commit a88663a

Please sign in to comment.