- using R Under development (unstable) (2024-06-28 r86849)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-14 (GCC) 14.1.0
GNU Fortran (GCC) 14.1.0
- running under: Fedora Linux 36 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘cubble/DESCRIPTION’ ... OK
- this is package ‘cubble’ version ‘0.3.0’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘cubble’ can be installed ... [17s/40s] OK
See the install log for details.
- checking package directory ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking whether startup messages can be suppressed ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [21s/53s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking R/sysdata.rda ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [19s/40s] ERROR
Running examples in ‘cubble-Ex.R’ failed
The error most likely occurred in:
> ### Name: arrange.temporal_cubble_df
> ### Title: 'dplyr' methods
> ### Aliases: arrange.temporal_cubble_df select.spatial_cubble_df
> ### select.temporal_cubble_df group_by.spatial_cubble_df
> ### group_by.temporal_cubble_df ungroup.spatial_cubble_df
> ### ungroup.temporal_cubble_df summarise.spatial_cubble_df
> ### summarise.temporal_cubble_df rename.spatial_cubble_df
> ### rename.temporal_cubble_df bind_rows.temporal_cubble_df
> ### bind_cols.spatial_cubble_df bind_cols.temporal_cubble_df
> ### rowwise.spatial_cubble_df rowwise.temporal_cubble_df
> ### dplyr_col_modify.cubble_df dplyr_row_slice.spatial_cubble_df
> ### dplyr_row_slice.temporal_cubble_df
> ### dplyr_reconstruct.spatial_cubble_df
> ### dplyr_reconstruct.temporal_cubble_df mutate.spatial_cubble_df
> ### filter.spatial_cubble_df arrange.spatial_cubble_df
>
> ### ** Examples
>
> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> cb_nested <- climate_mel
> cb_long <- face_temporal(climate_mel)
>
> # filter - currently filter.spatial_cubble_df, dply_row_slice
> cb_nested %>% filter(elev > 40)
# cubble: key: id [2], index: date, nested form
# spatial: [144.8321, -37.7276, 144.9066, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_long %>% filter(prcp > 0)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-05 -- 2020-01-07 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-05 18 16.1 12.5
2 ASN00086038 2020-01-06 104 17.5 11.1
3 ASN00086038 2020-01-07 14 20.7 12.1
4 ASN00086077 2020-01-05 20 17.4 12.7
5 ASN00086077 2020-01-06 122 17.8 11.8
6 ASN00086077 2020-01-07 6 20.3 12.6
7 ASN00086282 2020-01-05 16 15.7 12
8 ASN00086282 2020-01-06 90 17.3 11.5
9 ASN00086282 2020-01-07 6 19.9 11.8
>
> # mutate - curerntly mutate.spatial_cubble_df, dply_col_modify
> cb_nested %>% mutate(elev2 = elev + 10)
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts elev2
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]> 88.4
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]> 22.1
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]> 123.
> cb_long %>% mutate(prcp2 = prcp + 10)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp tmax tmin prcp2
<chr> <date> <dbl> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11 10
2 ASN00086038 2020-01-02 0 26.3 12.2 10
3 ASN00086038 2020-01-03 0 34.5 12.7 10
4 ASN00086038 2020-01-04 0 29.3 18.8 10
5 ASN00086038 2020-01-05 18 16.1 12.5 28
6 ASN00086038 2020-01-06 104 17.5 11.1 114
7 ASN00086038 2020-01-07 14 20.7 12.1 24
8 ASN00086038 2020-01-08 0 26.4 16.4 10
9 ASN00086038 2020-01-09 0 33.1 17.4 10
10 ASN00086038 2020-01-10 0 34 19.6 10
# ℹ 20 more rows
>
> # arrange - currently arrange.spatial_cubble_df, arrange.temporal_cubble_df
> cb_nested %>% arrange(wmo_id)
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
3 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
> cb_long %>% arrange(prcp)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11
2 ASN00086038 2020-01-02 0 26.3 12.2
3 ASN00086038 2020-01-03 0 34.5 12.7
4 ASN00086038 2020-01-04 0 29.3 18.8
5 ASN00086038 2020-01-08 0 26.4 16.4
6 ASN00086038 2020-01-09 0 33.1 17.4
7 ASN00086038 2020-01-10 0 34 19.6
8 ASN00086077 2020-01-01 0 24.7 10
9 ASN00086077 2020-01-02 0 24.8 11.8
10 ASN00086077 2020-01-03 0 35 12.2
# ℹ 20 more rows
>
> # summarise - summarise.spatial_cubble_df, summarise.temporal_cubble_df
> cb_long %>%
+ group_by(first_5 = ifelse(lubridate::day(date) <=5, 1, 2 )) %>%
+ summarise(tmax = mean(tmax))
# cubble: key: id [3], index: first_5, long form, groups: first_5 [2]
# temporal: 1 -- 2 [1], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
first_5 id tmax
<dbl> <chr> <dbl>
1 1 ASN00086038 26.6
2 1 ASN00086077 25.5
3 1 ASN00086282 27.1
4 2 ASN00086038 26.3
5 2 ASN00086077 25.9
6 2 ASN00086282 26.2
> cb_long %>%
+ mutate(first_5 = ifelse(lubridate::day(date) <=5, 1, 2)) %>%
+ summarise(t = mean(tmax), .by = first_5)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date t
<chr> <date> <dbl>
1 ASN00086038 2020-01-01 26.8
2 ASN00086038 2020-01-02 26.3
3 ASN00086038 2020-01-03 34.5
4 ASN00086038 2020-01-04 29.3
5 ASN00086038 2020-01-05 16.1
6 ASN00086038 2020-01-06 17.5
7 ASN00086038 2020-01-07 20.7
8 ASN00086038 2020-01-08 26.4
9 ASN00086038 2020-01-09 33.1
10 ASN00086038 2020-01-10 34
# ℹ 20 more rows
>
> # select - select.spatial_cubble_df, select.temporal_cubble_df
> cb_nested %>% select(name)
ℹ Missing attribute `id`, `long`, `lat`, and `ts`, add it back.
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat ts name
<chr> <dbl> <dbl> <list> <chr>
1 ASN00086038 145. -37.7 <tibble [10 × 4]> essendon airport
2 ASN00086077 145. -38.0 <tibble [10 × 4]> moorabbin airport
3 ASN00086282 145. -37.7 <tibble [10 × 4]> melbourne airport
> cb_nested %>% select(-id, -name)
ℹ Missing attribute `id`, add it back.
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts
<chr> <dbl> <dbl> <dbl> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 94870 <tibble [10 × 4]>
3 ASN00086282 145. -37.7 113. 94866 <tibble [10 × 4]>
> cb_long %>% select(prcp)
ℹ Missing attribute `id` and `date`, add it back.
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp
<chr> <date> <dbl>
1 ASN00086038 2020-01-01 0
2 ASN00086038 2020-01-02 0
3 ASN00086038 2020-01-03 0
4 ASN00086038 2020-01-04 0
5 ASN00086038 2020-01-05 18
6 ASN00086038 2020-01-06 104
7 ASN00086038 2020-01-07 14
8 ASN00086038 2020-01-08 0
9 ASN00086038 2020-01-09 0
10 ASN00086038 2020-01-10 0
# ℹ 20 more rows
> cb_long %>% select(-prcp, -date)
ℹ Missing attribute `date`, add it back.
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
date id tmax tmin
<date> <chr> <dbl> <dbl>
1 2020-01-01 ASN00086038 26.8 11
2 2020-01-02 ASN00086038 26.3 12.2
3 2020-01-03 ASN00086038 34.5 12.7
4 2020-01-04 ASN00086038 29.3 18.8
5 2020-01-05 ASN00086038 16.1 12.5
6 2020-01-06 ASN00086038 17.5 11.1
7 2020-01-07 ASN00086038 20.7 12.1
8 2020-01-08 ASN00086038 26.4 16.4
9 2020-01-09 ASN00086038 33.1 17.4
10 2020-01-10 ASN00086038 34 19.6
# ℹ 20 more rows
>
> # rename - rename.spatial_cubble_df, rename.temporal_cubble_df
> cb_nested %>% rename(elev2 = elev)
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev2 name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_long %>% rename(prcp2 = prcp)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp2 tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11
2 ASN00086038 2020-01-02 0 26.3 12.2
3 ASN00086038 2020-01-03 0 34.5 12.7
4 ASN00086038 2020-01-04 0 29.3 18.8
5 ASN00086038 2020-01-05 18 16.1 12.5
6 ASN00086038 2020-01-06 104 17.5 11.1
7 ASN00086038 2020-01-07 14 20.7 12.1
8 ASN00086038 2020-01-08 0 26.4 16.4
9 ASN00086038 2020-01-09 0 33.1 17.4
10 ASN00086038 2020-01-10 0 34 19.6
# ℹ 20 more rows
> # rename on key attributes
> cb_nested %>% rename(id2 = id)
# cubble: key: id2 [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id2 long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_long %>% rename(date2 = date)
# cubble: key: id [3], index: date2, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date2 prcp tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11
2 ASN00086038 2020-01-02 0 26.3 12.2
3 ASN00086038 2020-01-03 0 34.5 12.7
4 ASN00086038 2020-01-04 0 29.3 18.8
5 ASN00086038 2020-01-05 18 16.1 12.5
6 ASN00086038 2020-01-06 104 17.5 11.1
7 ASN00086038 2020-01-07 14 20.7 12.1
8 ASN00086038 2020-01-08 0 26.4 16.4
9 ASN00086038 2020-01-09 0 33.1 17.4
10 ASN00086038 2020-01-10 0 34 19.6
# ℹ 20 more rows
>
> # join - mutate_join - dplyr_reconstruct()
> # join - filter_join - dplyr_row_slice()
> df1 <- cb_nested %>% as_tibble() %>% select(id, name) %>% head(2)
> nested <- cb_nested %>% select(-name)
> nested %>% left_join(df1, by = "id")
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
1 ASN00086038 145. -37.7 78.4 95866 <tibble [10 × 4]> essendon airport
2 ASN00086077 145. -38.0 12.1 94870 <tibble [10 × 4]> moorabbin airport
3 ASN00086282 145. -37.7 113. 94866 <tibble [10 × 4]> <NA>
> nested %>% right_join(df1, by = "id")
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
1 ASN00086038 145. -37.7 78.4 95866 <tibble [10 × 4]> essendon airport
2 ASN00086077 145. -38.0 12.1 94870 <tibble [10 × 4]> moorabbin airport
> nested %>% inner_join(df1, by = "id")
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
1 ASN00086038 145. -37.7 78.4 95866 <tibble [10 × 4]> essendon airport
2 ASN00086077 145. -38.0 12.1 94870 <tibble [10 × 4]> moorabbin airport
> nested %>% full_join(df1, by = "id")
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
1 ASN00086038 145. -37.7 78.4 95866 <tibble [10 × 4]> essendon airport
2 ASN00086077 145. -38.0 12.1 94870 <tibble [10 × 4]> moorabbin airport
3 ASN00086282 145. -37.7 113. 94866 <tibble [10 × 4]> <NA>
> nested %>% anti_join(df1, by = "id")
# cubble: key: id [1], index: date, nested form
# spatial: [144.8321, -37.6655, 144.8321, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts
<chr> <dbl> <dbl> <dbl> <dbl> <list>
1 ASN00086282 145. -37.7 113. 94866 <tibble [10 × 4]>
>
> # bind_rows - dplyr_reconstruct, bind_rows.temporal_cubble_df
> df1 <- cb_nested %>% head(1)
> df2 <- cb_nested %>% tail(2)
> bind_rows(df1, df2)
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> df1 <- cb_long %>% head(10)
> df2 <- cb_long %>% tail(20)
> bind_rows(df1, df2)
# cubble: key: id [1], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11
2 ASN00086038 2020-01-02 0 26.3 12.2
3 ASN00086038 2020-01-03 0 34.5 12.7
4 ASN00086038 2020-01-04 0 29.3 18.8
5 ASN00086038 2020-01-05 18 16.1 12.5
6 ASN00086038 2020-01-06 104 17.5 11.1
7 ASN00086038 2020-01-07 14 20.7 12.1
8 ASN00086038 2020-01-08 0 26.4 16.4
9 ASN00086038 2020-01-09 0 33.1 17.4
10 ASN00086038 2020-01-10 0 34 19.6
# ℹ 20 more rows
>
> # relocate - dplyr_col_select, dplyr_col_select
> cb_nested %>% relocate(ts, .before = name)
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev ts name wmo_id
<chr> <dbl> <dbl> <dbl> <list> <chr> <dbl>
1 ASN00086038 145. -37.7 78.4 <tibble [10 × 4]> essendon airport 95866
2 ASN00086077 145. -38.0 12.1 <tibble [10 × 4]> moorabbin airport 94870
3 ASN00086282 145. -37.7 113. <tibble [10 × 4]> melbourne airport 94866
> cb_nested %>% face_temporal() %>% relocate(tmin)
# cubble: key: id [3], index: date, long form
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
tmin id date prcp tmax
<dbl> <chr> <date> <dbl> <dbl>
1 11 ASN00086038 2020-01-01 0 26.8
2 12.2 ASN00086038 2020-01-02 0 26.3
3 12.7 ASN00086038 2020-01-03 0 34.5
4 18.8 ASN00086038 2020-01-04 0 29.3
5 12.5 ASN00086038 2020-01-05 18 16.1
6 11.1 ASN00086038 2020-01-06 104 17.5
7 12.1 ASN00086038 2020-01-07 14 20.7
8 16.4 ASN00086038 2020-01-08 0 26.4
9 17.4 ASN00086038 2020-01-09 0 33.1
10 19.6 ASN00086038 2020-01-10 0 34
# ℹ 20 more rows
>
> # slice - all the slice_* uses dplyr::slice(), which uses dplyr_row_slice()
> cb_nested %>% slice_head(n = 2)
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
> cb_nested %>% slice_tail(n = 2)
# cubble: key: id [2], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
2 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_nested %>% slice_max(elev)
# cubble: key: id [1], index: date, nested form
# spatial: [144.8321, -37.6655, 144.8321, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_nested %>% slice_min(elev)
# cubble: key: id [1], index: date, nested form
# spatial: [145.0964, -37.98, 145.0964, -37.98], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
> cb_nested %>% slice_sample(n = 2)
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
>
> # rowwise - rowwise.spatial_cubble_df, rowwise.temporal_cuble_df
> cb_nested %>% rowwise()
# cubble: key: id [3], index: date, nested form, groups: rowwise
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 × 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 × 4]>
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 × 4]>
> cb_long %>% rowwise()
# cubble: key: id [3], index: date, long form, groups: rowwise
# temporal: 2020-01-01 -- 2020-01-10 [1D], no gaps
# spatial: long [dbl], lat [dbl], elev [dbl], name [chr], wmo_id [dbl]
id date prcp tmax tmin
<chr> <date> <dbl> <dbl> <dbl>
1 ASN00086038 2020-01-01 0 26.8 11
2 ASN00086038 2020-01-02 0 26.3 12.2
3 ASN00086038 2020-01-03 0 34.5 12.7
4 ASN00086038 2020-01-04 0 29.3 18.8
5 ASN00086038 2020-01-05 18 16.1 12.5
6 ASN00086038 2020-01-06 104 17.5 11.1
7 ASN00086038 2020-01-07 14 20.7 12.1
8 ASN00086038 2020-01-08 0 26.4 16.4
9 ASN00086038 2020-01-09 0 33.1 17.4
10 ASN00086038 2020-01-10 0 34 19.6
# ℹ 20 more rows
>
> # group_by & ungroup -
> (res <- cb_nested %>% mutate(group1 = c(1, 1, 2)) %>% group_by(group1))
# cubble: key: id [3], index: date, nested form, groups: group1 [2]
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts group1
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble> 1
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble> 1
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble> 2
> res %>% ungroup()
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts group1
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble> 1
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble> 1
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble> 2
> (res2 <- res %>% face_temporal() %>% unfold(group1) %>% group_by(group1))
Adding missing grouping variables: `group1`
Error in `group_by()`:
! Must group by variables found in `.data`.
✖ Column `group1` is not found.
Backtrace:
▆
1. ├─res %>% face_temporal() %>% unfold(group1) %>% ...
2. ├─dplyr::group_by(., group1)
3. ├─cubble:::group_by.temporal_cubble_df(., group1)
4. ├─base::NextMethod()
5. └─dplyr:::group_by.data.frame(., group1)
6. └─dplyr::group_by_prepare(.data, ..., .add = .add, error_call = current_env())
7. └─rlang::abort(bullets, call = error_call)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... OK
Running ‘spelling.R’
Running ‘testthat.R’
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [95s/249s] ERROR
Error(s) in re-building vignettes:
--- re-building ‘cb1class.Rmd’ using rmarkdown
--- finished re-building ‘cb1class.Rmd’
--- re-building ‘cb2create.Rmd’ using rmarkdown
--- finished re-building ‘cb2create.Rmd’
--- re-building ‘cb3tsibblesf.Rmd’ using rmarkdown
--- finished re-building ‘cb3tsibblesf.Rmd’
--- re-building ‘cb4glyph.Rmd’ using rmarkdown
** Processing: /data/gannet/ripley/R/packages/tests-devel/cubble.Rcheck/vign_test/cubble/vignettes/cb4glyph_files/figure-html/unnamed-chunk-6-1.png
288x288 pixels, 8 bits/pixel, 255 colors in palette
Reducing image to 8 bits/pixel, grayscale
Input IDAT size = 6042 bytes
Input file size = 6897 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 5338
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 5338
Output IDAT size = 5338 bytes (704 bytes decrease)
Output file size = 5416 bytes (1481 bytes = 21.47% decrease)
--- finished re-building ‘cb4glyph.Rmd’
--- re-building ‘cb5match.Rmd’ using rmarkdown
** Processing: /data/gannet/ripley/R/packages/tests-devel/cubble.Rcheck/vign_test/cubble/vignettes/cb5match_files/figure-html/unnamed-chunk-2-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28812 bytes
Input file size = 28926 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20562
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20562
Output IDAT size = 20562 bytes (8250 bytes decrease)
Output file size = 20640 bytes (8286 bytes = 28.65% decrease)
Quitting from lines 110-149 [unnamed-chunk-7] (cb5match.Rmd)
Error: processing vignette 'cb5match.Rmd' failed with diagnostics:
C stack usage 19927636 is too close to the limit
--- failed re-building ‘cb5match.Rmd’
--- re-building ‘cb6interactive.Rmd’ using rmarkdown
--- finished re-building ‘cb6interactive.Rmd’
SUMMARY: processing the following file failed:
‘cb5match.Rmd’
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... [9s/23s] OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 2 ERRORs