Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
samssann authored Mar 11, 2023
1 parent 3e6daff commit 6219950
Show file tree
Hide file tree
Showing 10 changed files with 205 additions and 313 deletions.
124 changes: 61 additions & 63 deletions tests/testthat/_snaps/deconstruct.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$fks_in
# A tibble: 2 x 3
Expand Down Expand Up @@ -68,7 +68,7 @@
$airlines$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$airlines$fks_in
# A tibble: 1 x 3
Expand All @@ -78,7 +78,7 @@
$airlines$fks_out
# A tibble: 0 x 3
# ... with 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# * 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# parent_key_cols <keys>
$airlines$uuid
Expand All @@ -91,7 +91,7 @@
$airports$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$airports$fks_in
# A tibble: 2 x 3
Expand All @@ -102,7 +102,7 @@
$airports$fks_out
# A tibble: 0 x 3
# ... with 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# * 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# parent_key_cols <keys>
$airports$uuid
Expand All @@ -115,12 +115,11 @@
$flights$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$flights$fks_in
# A tibble: 0 x 3
# ... with 3 variables: child_uuid <chr>, child_fk_cols <keys>,
# parent_key_cols <keys>
# * 3 variables: child_uuid <chr>, child_fk_cols <keys>, parent_key_cols <keys>
$flights$fks_out
# A tibble: 5 x 3
Expand All @@ -142,7 +141,7 @@
$planes$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$planes$fks_in
# A tibble: 1 x 3
Expand All @@ -152,7 +151,7 @@
$planes$fks_out
# A tibble: 0 x 3
# ... with 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# * 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# parent_key_cols <keys>
$planes$uuid
Expand All @@ -165,7 +164,7 @@
$weather$uks
# A tibble: 0 x 1
# ... with 1 variable: column <list>
# * 1 variable: column <list>
$weather$fks_in
# A tibble: 1 x 3
Expand All @@ -175,7 +174,7 @@
$weather$fks_out
# A tibble: 0 x 3
# ... with 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# * 3 variables: child_fk_cols <keys>, parent_uuid <chr>,
# parent_key_cols <keys>
$weather$uuid
Expand All @@ -190,23 +189,22 @@
Output
# A tibble: 1,761 x 19
# Keys: --- | 0 | 5
year month day dep_time sched_de~1 dep_d~2 arr_t~3 sched~4 arr_d~5 carrier
<int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
1 2013 1 10 3 2359 4 426 437 -11 B6
2 2013 1 10 16 2359 17 447 444 3 B6
3 2013 1 10 450 500 -10 634 648 -14 US
4 2013 1 10 520 525 -5 813 820 -7 UA
5 2013 1 10 530 530 0 824 829 -5 UA
6 2013 1 10 531 540 -9 832 850 -18 AA
7 2013 1 10 535 540 -5 1015 1017 -2 B6
8 2013 1 10 546 600 -14 645 709 -24 B6
9 2013 1 10 549 600 -11 652 724 -32 EV
10 2013 1 10 550 600 -10 649 703 -14 US
# ... with 1,751 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
# 1: sched_dep_time, 2: dep_delay, 3: arr_time, 4: sched_arr_time,
# 5: arr_delay
year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time
<int> <int> <int> <int> <int> <dbl> <int> <int>
1 2013 1 10 3 2359 4 426 437
2 2013 1 10 16 2359 17 447 444
3 2013 1 10 450 500 -10 634 648
4 2013 1 10 520 525 -5 813 820
5 2013 1 10 530 530 0 824 829
6 2013 1 10 531 540 -9 832 850
7 2013 1 10 535 540 -5 1015 1017
8 2013 1 10 546 600 -14 645 709
9 2013 1 10 549 600 -11 652 724
10 2013 1 10 550 600 -10 649 703
# * 1,751 more rows
# * 11 more variables: arr_delay <dbl>, carrier <chr>, flight <int>,
# tailnum <chr>, origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>,
# hour <dbl>, minute <dbl>, time_hour <dttm>
Code
keyed_tbl_impl(dm_nycflights13(cycle = TRUE), "airports")
Output
Expand All @@ -224,7 +222,7 @@
8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~
9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~
10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~
# ... with 76 more rows
# * 76 more rows
Code
keyed_tbl_impl(dm_nycflights13(cycle = TRUE), "airlines")
Output
Expand Down Expand Up @@ -1449,24 +1447,25 @@
Output
# A tibble: 1,800 x 32
# Keys: --- | 1 | 4
origin year.x month.x day.x hour.x temp dewp humid wind_dir wind_~1 wind_~2
<chr> <int> <int> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA
2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA
3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA
4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA
5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA
6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7
7 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7
8 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3
9 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3
10 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3
# ... with 1,790 more rows, 21 more variables: precip <dbl>, pressure <dbl>,
origin year.x month.x day.x hour.x temp dewp humid wind_dir wind_speed
<chr> <int> <int> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
1 EWR 2013 1 10 0 41 32 70.1 230 8.06
2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21
3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90
4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75
5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90
6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7
7 EWR 2013 1 10 5 41 26.1 55.0 300 12.7
8 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90
9 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90
10 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90
# * 1,790 more rows
# * 22 more variables: wind_gust <dbl>, precip <dbl>, pressure <dbl>,
# visib <dbl>, time_hour <dttm>, year.y <int>, month.y <int>, day.y <int>,
# dep_time <int>, sched_dep_time <int>, dep_delay <dbl>, arr_time <int>,
# sched_arr_time <int>, arr_delay <dbl>, carrier <chr>, flight <int>,
# tailnum <chr>, dest <chr>, air_time <dbl>, distance <dbl>, hour.y <dbl>,
# minute <dbl>, and abbreviated variable names 1: wind_speed, 2: wind_gust
# minute <dbl>

# semi_join()

Expand Down Expand Up @@ -1534,23 +1533,22 @@
# A tibble: 1,761 x 19
# Groups: month [2]
# Keys: --- | 0 | 5
year month day dep_time sched_de~1 dep_d~2 arr_t~3 sched~4 arr_d~5 carrier
<int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr>
1 2013 1 10 3 2359 4 426 437 -11 B6
2 2013 1 10 16 2359 17 447 444 3 B6
3 2013 1 10 450 500 -10 634 648 -14 US
4 2013 1 10 520 525 -5 813 820 -7 UA
5 2013 1 10 530 530 0 824 829 -5 UA
6 2013 1 10 531 540 -9 832 850 -18 AA
7 2013 1 10 535 540 -5 1015 1017 -2 B6
8 2013 1 10 546 600 -14 645 709 -24 B6
9 2013 1 10 549 600 -11 652 724 -32 EV
10 2013 1 10 550 600 -10 649 703 -14 US
# ... with 1,751 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
# 1: sched_dep_time, 2: dep_delay, 3: arr_time, 4: sched_arr_time,
# 5: arr_delay
year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time
<int> <int> <int> <int> <int> <dbl> <int> <int>
1 2013 1 10 3 2359 4 426 437
2 2013 1 10 16 2359 17 447 444
3 2013 1 10 450 500 -10 634 648
4 2013 1 10 520 525 -5 813 820
5 2013 1 10 530 530 0 824 829
6 2013 1 10 531 540 -9 832 850
7 2013 1 10 535 540 -5 1015 1017
8 2013 1 10 546 600 -14 645 709
9 2013 1 10 549 600 -11 652 724
10 2013 1 10 550 600 -10 649 703
# * 1,751 more rows
# * 11 more variables: arr_delay <dbl>, carrier <chr>, flight <int>,
# tailnum <chr>, origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>,
# hour <dbl>, minute <dbl>, time_hour <dttm>
Code
keyed_tbl_impl(dm, "airports") %>% group_by(tzone)
Output
Expand All @@ -1569,7 +1567,7 @@
8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~
9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~
10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~
# ... with 76 more rows
# * 76 more rows
Code
keyed_tbl_impl(dm, "airports") %>% group_by(faa)
Output
Expand All @@ -1588,7 +1586,7 @@
8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~
9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~
10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~
# ... with 76 more rows
# * 76 more rows

# summarize for keyed tables produces expected output

Expand Down
Loading

0 comments on commit 6219950

Please sign in to comment.