pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/R-tidyr (math/R-tidyr) Updated 1.0.2 to 1.1.3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b98813534322
branches:  trunk
changeset: 458590:b98813534322
user:      mef <mef%pkgsrc.org@localhost>
date:      Sat Sep 18 14:01:44 2021 +0000

description:
(math/R-tidyr) Updated 1.0.2 to 1.1.3

# tidyr 1.1.3

* tidyr verbs no longer have "default" methods for lazyeval fallbacks. This
  means that you'll get clearer error messages (#1036).

* `uncount()` error for non-integer weights and gives a clearer error message
  for negative weights (@mgirlich, #1069).

* You can once again unnest dates (#1021, #1089).

* `pivot_wider()` works with data.table and empty key variables (@mgirlich, #1066).

* `separate_rows()` works for factor columns (@mgirlich, #1058).

# tidyr 1.1.2

* `separate_rows()` returns to 1.1.0 behaviour for empty strings
  (@rjpatm, #1014).

# tidyr 1.1.1

* New tidyr logo!

* stringi dependency has been removed; this was a substantial dependency that
  make tidyr hard to compile in resource constrained environments
  (@rjpat, #936).

* Replace Rcpp with cpp11. See <https://cpp11.r-lib.org/articles/motivations.html>
  for reasons why.

# tidyr 1.1.0

## General features

* `pivot_longer()`, `hoist()`, `unnest_wider()`, and `unnest_longer()` gain
  new `transform` arguments; these allow you to transform values "in flight".
  They are partly needed because vctrs coercion rules have become stricter,
  but they give you greater flexibility than was available previously (#921).

* Arguments that use tidy selection syntax are now clearly documented and
  have been updated to use tidyselect 1.1.0 (#872).

## Pivoting improvements

* Both `pivot_wider()` and `pivot_longer()` are considerably more performant,
  thanks largely to improvements in the underlying vctrs code
  (#790, @DavisVaughan).

* `pivot_longer()` now supports `names_to = character()` which prevents the
  name column from being created (#961).

    ```{r}
    df <- tibble(id = 1:3, x_1 = 1:3, x_2 = 4:6)
    df %>% pivot_longer(-id, names_to = character())
    ```

* `pivot_longer()` no longer creates a `.copy` variable in the presence of
  duplicate column names. This makes it more consistent with the handling
  of non-unique specs.

* `pivot_longer()` automatically disambiguates non-unique ouputs, which can
  occur when the input variables include some additional component that you
  don't care about and want to discard (#792, #793).

    ```{r}
    df <- tibble(id = 1:3, x_1 = 1:3, x_2 = 4:6)
    df %>% pivot_longer(-id, names_pattern = "(.)_.")
    df %>% pivot_longer(-id, names_sep = "_", names_to = c("name", NA))
    df %>% pivot_longer(-id, names_sep = "_", names_to = c(".value", NA))
    ```

* `pivot_wider()` gains a `names_sort` argument which allows you to sort
  column names in order. The default, `FALSE`, orders columms by their
  first appearance (#839). In a future version, I'll consider changing the
  default to `TRUE`.

* `pivot_wider()` gains a `names_glue` argument that allows you to construct
  output column names with a glue specification.

* `pivot_wider()` arguments `values_fn` and `values_fill` can now be single
  values; you now only need to use a named list if you want to use different
  values for different value columns (#739, #746). They also get improved
  errors if they're not of the expected type.

## Rectangling

* `hoist()` now automatically names pluckers that are a single string (#837).
  It error if you use duplicated column names (@mgirlich, #834), and now uses
  `rlang::list2()` behind the scenes (which means that you can now use `!!!`
  and `:=`) (#801).

* `unnest_longer()`, `unnest_wider()`, and `hoist()` do a better job
  simplifying list-cols. They no longer add unneeded `unspecified()` when
  the result is still a list (#806), and work when the list contains
  non-vectors (#810, #848).

* `unnest_wider(names_sep = "")` now provides default names for unnamed inputs,
  suppressing the many previous name repair messages (#742).

## Nesting

* `pack()` and `nest()` gains a `.names_sep` argument allows you to strip outer
  names from inner names, in symmetrical way to how the same argument to
  `unpack()` and `unnest()` combines inner and outer names (#795, #797).

* `unnest_wider()` and `unnest_longer()` can now unnest `list_of` columns. This
  is important for unnesting columns created from `nest()` and with
  `pivot_wider()`, which will create `list_of` columns if the id columns are
  non-unique (#741).

## Bug fixes and minor improvements

* `chop()` now creates list-columns of class `vctrs::list_of()`. This helps
  keep track of the type in case the chopped data frame is empty, allowing
  `unchop()` to reconstitute a data frame with the correct number and types
  of column even when there are no observations.

* `drop_na()` now preserves attributes of unclassed vectors (#905).

* `expand()`, `expand_grid()`, `crossing()`, and `nesting()` once again
  evaluate their inputs iteratively, so you can refer to freshly created
  columns, e.g. `crossing(x = seq(-2, 2), y = x)` (#820).

* `expand()`, `expand_grid()`, `crossing()`, and `nesting()` gain a
  `.name_repair` giving you control over their name repair strategy
  (@jeffreypullin, #798).

* `extract()` lets you use `NA` in `into`, as documented (#793).

* `extract()`, `separate()`, `hoist()`, `unnest_longer()`, and `unnest_wider()`
  give a better error message if `col` is missing (#805).

* `pack()`'s first argument is now `.data` instead of `data` (#759).

* `pivot_longer()` now errors if `values_to` is not a length-1 character vector
  (#949).

* `pivot_longer()` and `pivot_wider()` are now generic so implementations
  can be provided for objects other than data frames (#800).

* `pivot_wider()` can now pivot data frame columns (#926)

* `unite(na.rm = TRUE)` now works for all types of variable, not just character
  vectors (#765).

* `unnest_wider()` gives a better error message if you attempt to unnest
  multiple columns (#740).

* `unnest_auto()` works when the input data contains a column called `col`
  (#959).

diffstat:

 math/R-tidyr/Makefile |  15 ++++++++++++---
 math/R-tidyr/distinfo |  10 +++++-----
 2 files changed, 17 insertions(+), 8 deletions(-)

diffs (47 lines):

diff -r d6db8cb8f6bc -r b98813534322 math/R-tidyr/Makefile
--- a/math/R-tidyr/Makefile     Sat Sep 18 14:01:23 2021 +0000
+++ b/math/R-tidyr/Makefile     Sat Sep 18 14:01:44 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2020/07/31 21:49:29 brook Exp $
+# $NetBSD: Makefile,v 1.3 2021/09/18 14:01:44 mef Exp $
 
 R_PKGNAME=     tidyr
-R_PKGVER=      1.0.2
+R_PKGVER=      1.1.3
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 COMMENT=       Easily tidy data with 'spread()' and 'gather()' functions
@@ -19,8 +19,17 @@
 DEPENDS+=      R-vctrs>=0.2.0:../../math/R-vctrs
 DEPENDS+=      R-stringi>=1.4.6:../../textproc/R-stringi
 
+# Package suggested but not available: 'repurrrsive'
+TEST_DEPENDS+= R-covr-[0-9]*:../../devel/R-covr
+TEST_DEPENDS+= R-data.table-[0-9]*:../../textproc/R-data.table
+TEST_DEPENDS+= R-jsonlite-[0-9]*:../../textproc/R-jsonlite
+TEST_DEPENDS+= R-knitr-[0-9]*:../../print/R-knitr
+TEST_DEPENDS+= R-readr-[0-9]*:../../textproc/R-readr
+TEST_DEPENDS+= R-rmarkdown-[0-9]*:../../textproc/R-rmarkdown
+TEST_DEPENDS+= R-testthat-[0-9]*:../../devel/R-testthat
+
 USE_LANGUAGES= c c++
 
 .include "../../math/R/Makefile.extension"
-.include "../../devel/R-Rcpp/buildlink3.mk"
+.include "../../lang/R-cpp11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r d6db8cb8f6bc -r b98813534322 math/R-tidyr/distinfo
--- a/math/R-tidyr/distinfo     Sat Sep 18 14:01:23 2021 +0000
+++ b/math/R-tidyr/distinfo     Sat Sep 18 14:01:44 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2020/07/31 21:49:29 brook Exp $
+$NetBSD: distinfo,v 1.3 2021/09/18 14:01:44 mef Exp $
 
-SHA1 (R/tidyr_1.0.2.tar.gz) = 0d786d320de376ac001a72b4ab6c03ef8c54deaa
-RMD160 (R/tidyr_1.0.2.tar.gz) = c6cb918d7791ef797f12456a79c0b18c93112259
-SHA512 (R/tidyr_1.0.2.tar.gz) = 75c93ae85a20c43de8111acfe56e93793ff850fb6d3f0704d02121644f1ebad0895a37fb1dce1f02d839a8f835e32bf3b5196db87158ce9c6e9a9ef07ec9cf30
-Size (R/tidyr_1.0.2.tar.gz) = 812005 bytes
+SHA1 (R/tidyr_1.1.3.tar.gz) = bf3f901350245725f7076b8400fc69c0a1354a38
+RMD160 (R/tidyr_1.1.3.tar.gz) = 845b090c4f7c1b6d68b4494ebae6774bc7725c07
+SHA512 (R/tidyr_1.1.3.tar.gz) = e506126251ff53c2e9c5101c4ad47f4f160a8d4e5e43384d7934b733830c80e329bd0850fdfc13de47cf9fde2efcdb80e631e3042011b0510a0fb91fe7c89da5
+Size (R/tidyr_1.1.3.tar.gz) = 707909 bytes



Home | Main Index | Thread Index | Old Index