- Jun 2022
-
jrnold.github.io jrnold.github.io
-
The code would have had to check if the departure time is less than the scheduled departure time plus departure delay (in minutes).
This error is addressed and corrected in 16.4.2 - maybe worth noting for readers who want to check out solution.
-
-
jrnold.github.io jrnold.github.io
-
"2003-01-01"
I think this should be Feb 1 2003 (2003-02-01), based on: date_custom <- c("Day 01 Mon 02 Year 03", "Day 03 Mon 01 Year 01")
-
read_csv("a,b\n\"1")
behavior is different now: "> read_csv("a,b\n\"1") Rows: 0 Columns: 2 <br /> -- Column specification --------------------------------------------------------------- Delimiter: "," chr (2): a, b
i Use
spec()
to retrieve the full column specification for this data. i Specify the column types or setshow_col_types = FALSE
to quiet this message.A tibble: 0 x 2
... with 2 variables: a <chr>, b <chr>"
-
that value is dropped.
As above, behavior has changed and final two values now combined to "34".
-
#> Warning: 2 parsing failures.
read_csv behavior has changed, warning is now: "Warning message: One or more parsing issues, see
problems()
for details" -
the two functions have the exact same arguments:
This is becase read_csv() and read_tsv() are special cases of the more general read_delim().
-
-
jrnold.github.io jrnold.github.io
-
The n_extra argument determines the number of extra columns to print information for.
According to ?tibble::print.tbl we should use max_extra_cols now: "max_extra_cols Number of extra columns to print abbreviated information for, if the width is too small for the entire tibble. If NULL, the max_extra_cols option is used. The previously defined n_extra argument is soft-deprecated."
-
- May 2022
-
jrnold.github.io jrnold.github.io
-
(air_time_delay)
This should be air_time_delay_pct not air_time_delay. As it is, the tibble below shows the same results as above so we can't see the data sorted to show highest percent first.
-
These are a few ways to select columns
Another way to select these columns is by excluding all other columns (either by name as below or column number):
select(flights, -(year:day), -sched_dep_time, -sched_arr_time, -(carrier:time_hour))
This isn't a good coding approach, but as an example it does demonstrate how to exclude columns which was one of the techniques used in this section of the text.
-