More work on O'Reilly book
* Make width narrower * Convert deps to table * Strip chapter status
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
<section data-type="chapter" id="chp-numbers">
|
||||
<h1><span id="sec-numbers" class="quarto-section-identifier d-none d-lg-block"><span class="chapter-title">Numbers</span></span></h1><div data-type="note"><div class="callout-body d-flex">
|
||||
<div class="callout-icon-container">
|
||||
<i class="callout-icon"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<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></div>
|
||||
|
||||
<h1><span id="sec-numbers" class="quarto-section-identifier d-none d-lg-block"><span class="chapter-title">Numbers</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>
|
||||
@@ -218,14 +210,14 @@ x * c(1, 2, 3)
|
||||
<pre data-type="programlisting" data-code-language="downlit">flights |>
|
||||
filter(month == c(1, 2))
|
||||
#> # A tibble: 25,977 × 19
|
||||
#> year month day dep_time sched_dep…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier
|
||||
#> <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
|
||||
#> 1 2013 1 1 517 515 2 830 819 11 UA
|
||||
#> 2 2013 1 1 542 540 2 923 850 33 AA
|
||||
#> 3 2013 1 1 554 600 -6 812 837 -25 DL
|
||||
#> 4 2013 1 1 555 600 -5 913 854 19 B6
|
||||
#> 5 2013 1 1 557 600 -3 838 846 -8 B6
|
||||
#> 6 2013 1 1 558 600 -2 849 851 -2 B6
|
||||
#> year month day dep_time sched_…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier
|
||||
#> <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
|
||||
#> 1 2013 1 1 517 515 2 830 819 11 UA
|
||||
#> 2 2013 1 1 542 540 2 923 850 33 AA
|
||||
#> 3 2013 1 1 554 600 -6 812 837 -25 DL
|
||||
#> 4 2013 1 1 555 600 -5 913 854 19 B6
|
||||
#> 5 2013 1 1 557 600 -3 838 846 -8 B6
|
||||
#> 6 2013 1 1 558 600 -2 849 851 -2 B6
|
||||
#> # … with 25,971 more rows, 9 more variables: flight <int>, tailnum <chr>,
|
||||
#> # origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>, hour <dbl>,
|
||||
#> # minute <dbl>, time_hour <dttm>, and abbreviated variable names
|
||||
@@ -759,8 +751,8 @@ Positions</h2>
|
||||
fifth_dep = nth(dep_time, 5),
|
||||
last_dep = last(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 × 6
|
||||
#> # Groups: year, month [12]
|
||||
#> year month day first_dep fifth_dep last_dep
|
||||
@@ -783,14 +775,14 @@ Positions</h2>
|
||||
filter(r %in% c(1, max(r)))
|
||||
#> # A tibble: 1,195 × 20
|
||||
#> # Groups: year, month, day [365]
|
||||
#> year month day dep_time sched_dep…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier
|
||||
#> <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
|
||||
#> 1 2013 1 1 517 515 2 830 819 11 UA
|
||||
#> 2 2013 1 1 2353 2359 -6 425 445 -20 B6
|
||||
#> 3 2013 1 1 2353 2359 -6 418 442 -24 B6
|
||||
#> 4 2013 1 1 2356 2359 -3 425 437 -12 B6
|
||||
#> 5 2013 1 2 42 2359 43 518 442 36 B6
|
||||
#> 6 2013 1 2 458 500 -2 703 650 13 US
|
||||
#> year month day dep_time sched_…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier
|
||||
#> <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
|
||||
#> 1 2013 1 1 517 515 2 830 819 11 UA
|
||||
#> 2 2013 1 1 2353 2359 -6 425 445 -20 B6
|
||||
#> 3 2013 1 1 2353 2359 -6 418 442 -24 B6
|
||||
#> 4 2013 1 1 2356 2359 -3 425 437 -12 B6
|
||||
#> 5 2013 1 2 42 2359 43 518 442 36 B6
|
||||
#> 6 2013 1 2 458 500 -2 703 650 13 US
|
||||
#> # … with 1,189 more rows, 10 more variables: flight <int>, tailnum <chr>,
|
||||
#> # origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>, hour <dbl>,
|
||||
#> # minute <dbl>, time_hour <dttm>, r <int>, and abbreviated variable names
|
||||
|
||||
Reference in New Issue
Block a user