More work on O'Reilly book
* Make width narrower * Convert deps to table * Strip chapter status
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
<section data-type="chapter" id="chp-functions">
|
||||
<h1><span id="sec-functions" class="quarto-section-identifier d-none d-lg-block"><span class="chapter-title">Functions</span></span></h1><div data-type="note"><div class="callout-body d-flex">
|
||||
<div class="callout-icon-container">
|
||||
<i class="callout-icon"/>
|
||||
</div>
|
||||
|
||||
</div><h1>
|
||||
RStudio
|
||||
</h1><p>You are reading the work-in-progress second edition of R for Data Science. This chapter should be readable but is currently undergoing final polishing. You can find the complete first edition at <a href="https://r4ds.had.co.nz" class="uri">https://r4ds.had.co.nz</a>.</p>
|
||||
|
||||
<p>Once you start writing functions, there are two RStudio shortcuts that are super useful:</p><ul><li><p>To find the definition of a function that you’ve written, place the cursor on the name of the function and press <code>F2</code>.</p></li>
|
||||
<li><p>To quickly jump to a function, press <code>Ctrl + .</code> to open the fuzzy file and function finder and type the first few letters of your function name. You can also navigate to files, Quarto sections, and more, making it a very handy navigation tool.</p></li>
|
||||
</ul></div>
|
||||
|
||||
<h1><span id="sec-functions" class="quarto-section-identifier d-none d-lg-block"><span class="chapter-title">Functions</span></span></h1><p>::: status callout-note You are reading the work-in-progress second edition of R for Data Science. This chapter should be readable but is currently undergoing final polishing. You can find the complete first edition at <a href="https://r4ds.had.co.nz" class="uri">https://r4ds.had.co.nz</a>. :::</p>
|
||||
<section id="introduction" data-type="sect1">
|
||||
<h1>
|
||||
Introduction</h1>
|
||||
@@ -278,9 +266,7 @@ mape <- function(actual, predicted) {
|
||||
</div>
|
||||
<div data-type="note"><h1>
|
||||
RStudio
|
||||
</h1><p>You are reading the work-in-progress second edition of R for Data Science. This chapter should be readable but is currently undergoing final polishing. You can find the complete first edition at <a href="https://r4ds.had.co.nz" class="uri">https://r4ds.had.co.nz</a>.</p>
|
||||
|
||||
<p>Once you start writing functions, there are two RStudio shortcuts that are super useful:</p><ul><li><p>To find the definition of a function that you’ve written, place the cursor on the name of the function and press <code>F2</code>.</p></li>
|
||||
</h1><p>Once you start writing functions, there are two RStudio shortcuts that are super useful:</p><ul><li><p>To find the definition of a function that you’ve written, place the cursor on the name of the function and press <code>F2</code>.</p></li>
|
||||
<li><p>To quickly jump to a function, press <code>Ctrl + .</code> to open the fuzzy file and function finder and type the first few letters of your function name. You can also navigate to files, Quarto sections, and more, making it a very handy navigation tool.</p></li>
|
||||
</ul></div>
|
||||
|
||||
@@ -490,14 +476,14 @@ flights |> unique_where(tailnum == "N14228", month)
|
||||
|
||||
flights_sub(dest == "IAH", contains("time"))
|
||||
#> # A tibble: 7,198 × 8
|
||||
#> time_hour carrier flight dep_time sched_de…¹ arr_t…² sched…³ air_t…⁴
|
||||
#> <dttm> <chr> <int> <int> <int> <int> <int> <dbl>
|
||||
#> 1 2013-01-01 05:00:00 UA 1545 517 515 830 819 227
|
||||
#> 2 2013-01-01 05:00:00 UA 1714 533 529 850 830 227
|
||||
#> 3 2013-01-01 06:00:00 UA 496 623 627 933 932 229
|
||||
#> 4 2013-01-01 07:00:00 UA 473 728 732 1041 1038 238
|
||||
#> 5 2013-01-01 07:00:00 UA 1479 739 739 1104 1038 249
|
||||
#> 6 2013-01-01 09:00:00 UA 1220 908 908 1228 1219 233
|
||||
#> time_hour carrier flight dep_time sched…¹ arr_t…² sched…³ air_t…⁴
|
||||
#> <dttm> <chr> <int> <int> <int> <int> <int> <dbl>
|
||||
#> 1 2013-01-01 05:00:00 UA 1545 517 515 830 819 227
|
||||
#> 2 2013-01-01 05:00:00 UA 1714 533 529 850 830 227
|
||||
#> 3 2013-01-01 06:00:00 UA 496 623 627 933 932 229
|
||||
#> 4 2013-01-01 07:00:00 UA 473 728 732 1041 1038 238
|
||||
#> 5 2013-01-01 07:00:00 UA 1479 739 739 1104 1038 249
|
||||
#> 6 2013-01-01 09:00:00 UA 1220 908 908 1228 1219 233
|
||||
#> # … with 7,192 more rows, and abbreviated variable names ¹sched_dep_time,
|
||||
#> # ²arr_time, ³sched_arr_time, ⁴air_time</pre>
|
||||
</div>
|
||||
@@ -529,8 +515,8 @@ flights |>
|
||||
}
|
||||
flights |>
|
||||
count_missing(c(year, month, day), dep_time)
|
||||
#> `summarise()` has grouped output by 'year', 'month'. You can override using the
|
||||
#> `.groups` argument.
|
||||
#> `summarise()` has grouped output by 'year', 'month'. You can override using
|
||||
#> the `.groups` argument.
|
||||
#> # A tibble: 365 × 4
|
||||
#> # Groups: year, month [12]
|
||||
#> year month day n_miss
|
||||
|
||||
Reference in New Issue
Block a user