diff --git a/.dev/dev.R b/.dev/dev.R index 05cbc17..22fe7f5 100644 --- a/.dev/dev.R +++ b/.dev/dev.R @@ -9,3 +9,9 @@ devtools::document(here::here()) devtools::check(here::here()) # fix github actions usethis::use_github_action() +# check win-builder +devtools::check_win_devel(here::here()) +devtools::check_win_release(here::here()) +devtools::check_win_oldrelease(here::here()) +# update pkg site +pkgdown::build_site(here::here()) diff --git a/README.Rmd b/README.Rmd index 6708262..4cf26fe 100644 --- a/README.Rmd +++ b/README.Rmd @@ -28,7 +28,7 @@ set.seed(843) **Note: The expansion of `dtplyr` has made some of the functionality in `tidyfast` redundant. See `dtplyr` for a list of functions that are handled within that framework.** -The goal of `tidyfast` is to provide fast and efficient alternatives to some `tidyr` (and a few `dplyr`) functions using `data.table` under the hood. Each have the prefix of `dt_` to allow for autocomplete in IDEs such as RStudio. These should compliment some of the current functionality in `dtplyr` (but notably does not use the `lazy_dt()` framework of `dtplyr`). This package imports `data.table` and `Rcpp` (no other dependencies). +The goal of `tidyfast` is to provide fast and efficient alternatives to some `tidyr` (and a few `dplyr`) functions using `data.table` under the hood. Each have the prefix of `dt_` to allow for autocomplete in IDEs such as RStudio. These should compliment some of the current functionality in `dtplyr` (but notably does not use the `lazy_dt()` framework of `dtplyr`). This package imports `data.table` and `cpp11` (no other dependencies). These are, in essence, translations from a more `tidyverse` grammar to `data.table`. Most functions herein are in places where, in my opinion, the `data.table` syntax is not obvious or clear. As such, these functions can translate a simple function call into the fast, efficient, and concise syntax of `data.table`. @@ -457,7 +457,7 @@ head(dt_separate(dt_to_split, x, into = c("lower", "upper"))) ``` -Testing with a 4 MB data set with one variable that has columns of "A.B" repeatedly, shows that `dt_separate()` is fast but less memory efficient than `tidyr::separate()`. +Testing with a 4 MB data set with one variable that has columns of "A.B" repeatedly, shows that `dt_separate()` is fast and far more memory efficient compared to `tidyr::separate()`. ```{r, echo = FALSE, warning = FALSE} dt4 <- data.table( diff --git a/README.md b/README.md index 43aae19..33c0ed9 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ some `tidyr` (and a few `dplyr`) functions using `data.table` under the hood. Each have the prefix of `dt_` to allow for autocomplete in IDEs such as RStudio. These should compliment some of the current functionality in `dtplyr` (but notably does not use the `lazy_dt()` -framework of `dtplyr`). This package imports `data.table` and `Rcpp` (no -other dependencies). +framework of `dtplyr`). This package imports `data.table` and `cpp11` +(no other dependencies). These are, in essence, translations from a more `tidyverse` grammar to `data.table`. Most functions herein are in places where, in my opinion, @@ -244,13 +244,13 @@ highlighted below. Notably, the timings are without the `nested1` and #> # A tibble: 2 × 3 #> expression median mem_alloc #> - #> 1 dt_nest 1.15ms 2.88MB - #> 2 group_nest 1.93ms 5.12MB + #> 1 dt_nest 1.16ms 2.88MB + #> 2 group_nest 1.94ms 5.12MB #> # A tibble: 2 × 3 #> expression median mem_alloc #> - #> 1 dt_unnest 2.04ms 11.84MB - #> 2 unnest 2.31ms 5.96MB + #> 1 dt_unnest 2.22ms 11.84MB + #> 2 unnest 2.38ms 5.96MB ## Pivoting @@ -325,10 +325,10 @@ But let’s compare some basic speed and efficiency. Because of the #> # A tibble: 4 × 3 #> expression median mem_alloc #> - #> 1 dt_pivot_longer 366.17µs 1001.23KB - #> 2 pivot_longer 1.95ms 1.73MB - #> 3 dt_pivot_wider 5.54ms 1.99MB - #> 4 pivot_wider 3.81ms 2.71MB + #> 1 dt_pivot_longer 360.92µs 1001.23KB + #> 2 pivot_longer 1.93ms 1.73MB + #> 3 dt_pivot_wider 5.62ms 1.99MB + #> 4 pivot_wider 3.96ms 2.71MB ### If Else @@ -377,9 +377,9 @@ built on `data.table::fifelse()`. #> # A tibble: 3 × 3 #> expression median mem_alloc #> - #> 1 case_when 45.2ms 72.5MB - #> 2 dt_case_when 10.7ms 19.1MB - #> 3 fifelse 19.9ms 34.3MB + #> 1 case_when 44.9ms 72.5MB + #> 2 dt_case_when 10.6ms 19.1MB + #> 3 fifelse 20ms 34.3MB ## Fill @@ -492,8 +492,8 @@ marks3 <- #> # A tibble: 2 × 3 #> expression median mem_alloc #> - #> 1 tidyr::fill(dplyr::group_by(df3, id), x, y) 15.6ms 46.4MB - #> 2 tidyfast::dt_fill(dt3, x, y, id = list(id)) 12.6ms 17.6MB + #> 1 tidyr::fill(dplyr::group_by(df3, id), x, y) 15.9ms 46.4MB + #> 2 tidyfast::dt_fill(dt3, x, y, id = list(id)) 12.7ms 17.6MB ## Separate @@ -528,17 +528,17 @@ dt_separate(dt_to_split, x, into = c("lower", "upper")) #> 6: f F Testing with a 4 MB data set with one variable that has columns of “A.B” -repeatedly, shows that `dt_separate()` is fast but less memory efficient -than `tidyr::separate()`. +repeatedly, shows that `dt_separate()` is fast and far more memory +efficient compared to `tidyr::separate()`. #> # A tibble: 3 × 3 #> expression median mem_alloc #> - #> 1 separate 2.78s 3.89GB - #> 2 dt_separate 47.91ms 26.73MB - #> 3 dt_separate-mutable 47.51ms 26.72MB + #> 1 separate 2.76s 3.89GB + #> 2 dt_separate 46.59ms 26.73MB + #> 3 dt_separate-mutable 46.47ms 26.72MB ## Count and Uncount diff --git a/man/figures/README-third_pivot-1.png b/man/figures/README-third_pivot-1.png index c6103fc..f89977b 100644 Binary files a/man/figures/README-third_pivot-1.png and b/man/figures/README-third_pivot-1.png differ diff --git a/man/figures/README-third_pivot-2.png b/man/figures/README-third_pivot-2.png index 518310d..94ae527 100644 Binary files a/man/figures/README-third_pivot-2.png and b/man/figures/README-third_pivot-2.png differ diff --git a/man/figures/README-unnamed-chunk-13-1.png b/man/figures/README-unnamed-chunk-13-1.png index 95b36c4..02af214 100644 Binary files a/man/figures/README-unnamed-chunk-13-1.png and b/man/figures/README-unnamed-chunk-13-1.png differ diff --git a/man/figures/README-unnamed-chunk-16-1.png b/man/figures/README-unnamed-chunk-16-1.png index 26b4a40..99d6898 100644 Binary files a/man/figures/README-unnamed-chunk-16-1.png and b/man/figures/README-unnamed-chunk-16-1.png differ diff --git a/man/figures/README-unnamed-chunk-21-1.png b/man/figures/README-unnamed-chunk-21-1.png index 5958e74..24aa984 100644 Binary files a/man/figures/README-unnamed-chunk-21-1.png and b/man/figures/README-unnamed-chunk-21-1.png differ diff --git a/man/figures/README-unnamed-chunk-25-1.png b/man/figures/README-unnamed-chunk-25-1.png index 7026740..b48b533 100644 Binary files a/man/figures/README-unnamed-chunk-25-1.png and b/man/figures/README-unnamed-chunk-25-1.png differ diff --git a/man/figures/README-unnamed-chunk-9-1.png b/man/figures/README-unnamed-chunk-9-1.png index 6bdf814..913c4c7 100644 Binary files a/man/figures/README-unnamed-chunk-9-1.png and b/man/figures/README-unnamed-chunk-9-1.png differ