Movatterモバイル変換


[0]ホーム

URL:


rlang 1.1.6

rlang 1.1.4

rlang 1.1.3

rlang 1.1.2

rlang 1.1.1

rlang 1.1.0

Life cycle changes

Main new features

Miscellaneous fixes andfeatures

rlang 1.0.6

rlang 1.0.5

rlang 1.0.4

rlang 1.0.3

rlang 1.0.2

rlang 1.0.1

rlang 1.0.0

Major changes

This release focuses on the rlang errors framework and featuresextensive changes to the display of error messages.

Breaking changes

Fixes and features

tidyeval

rlang errors

Backtraces

Argument intake

R APIs

rlang 0.4.12

rlang 0.4.11

rlang 0.4.10

rlang 0.4.9

Breaking changes

New features

Bugfixes and improvements

rlang 0.4.8

rlang 0.4.7

rlang 0.4.6

rlang 0.4.5

rlang 0.4.4

rlang 0.4.3

rlang 0.4.2

rlang 0.4.1

rlang 0.4.0

Tidy evaluation

Interpolatefunction inputs with the curly-curly operator

The main change of this release is the new tidy evaluation operator{{. This operator abstracts the quote-and-unquote idiominto a single interpolation step:

my_wrapper <- function(data, var, by) {  data %>%    group_by({{ by }}) %>%    summarise(average = mean({{ var }}, na.rm = TRUE))}

{{ var }} is a shortcut for!!enquo(var)that should be easier on the eyes, and easier to learn and teach.

Note that for multiple inputs, the existing documentation doesn’tstress enough that you can just pass dots straight to other tidy evalfunctions. There is no need for quote-and-unquote unless you need tomodify the inputs or their names in some way:

my_wrapper <- function(data, var, ...) {  data %>%    group_by(...) %>%    summarise(average = mean({{ var }}, na.rm = TRUE))}

More robust.envpronoun

Another improvement to tidy evaluation should make it easier to usethe.env pronoun. Starting from this release, subsetting anobject from the.env pronoun now evaluates thecorresponding symbol. This makes.env more robust, inparticular in magrittr pipelines. The following example would previouslyfail:

foo <- 10mtcars %>% mutate(cyl = cyl * .env$foo)

This way, using the.env pronoun is now equivalent tounquoting a constant objects, but with an easier syntax:

mtcars %>% mutate(cyl = cyl * !!foo)

Note that following this change, and despite its name,.env is no longer referring to a bare environment. Instead,it is a special shortcut with its own rules. Similarly, the.data pronoun is not really a data frame.

New functions and features

Performance

Bugfixes and smallimprovements

Lifecycle

We commit to support 5 versions of R. As R 3.6 is about to bereleased, rlang now requires R 3.2 or greater. We’re also continuing ourefforts to streamline and narrow the rlang API.

rlang 0.3.2

rlang 0.3.1

This patch release polishes the new backtrace feature introduced inrlang 0.3.0 and solves bugs for the upcoming release of purrr 0.3.0. Italso featuresas_label() andas_name() whichare meant to replacequo_name() in the future. Finally, abunch of deparsing issues have been fixed.

Backtrace fixes

as_label() andas_name()

The newas_label() andas_name() functionsshould be used instead ofquo_name() to transform objectsand quoted expressions to a string. We have noticed that tidy eval usersoften usequo_name() to extract names from quosuredsymbols. This is not a good use for that function because the wayquo_name() creates a string is not a well definedoperation.

For this reason, we are replacingquo_name() with twonew functions that have more clearly defined purposes, and hopefullybetter names reflecting those purposes. Useas_label() totransform any object to a short human-readable description, andas_name() to extract names from (possibly quosured)symbols.

Create labels withas_label() to:

We expectas_label() to gain additional parameters inthe future, for example to control the maximum width of a label. The wayan object is labelled is thus subject to change.

On the other hand,as_name() transforms symbols back toa string in a well defined manner. Unlikeas_label(),as_name() guarantees the roundtrip symbol -> string-> symbol.

In general, if you don’t know for sure what kind of object you’redealing with (a call, a symbol, an unquoted constant), useas_label() and make no assumption about the resultingstring. If you know you have a symbol and need the name of the object itrefers to, useas_name(). For instance, useas_label() with objects captured withenquo()andas_name() with symbols captured withensym().

Note thatquo_name() will only be soft-deprecated at thenext major version of rlang (0.4.0). At this point, it will startissuing once-per-session warnings in scripts, but not in packages. Itwill then be deprecated in yet another major version, at which point itwill issue once-per-session warnings in packages as well. You thus haveplenty of time to change your code.

Minor fixes and features

rlang 0.3.0

Breaking changes

The rlang API is still maturing. In this section, you’ll find hardbreaking changes. See the life cycle section below for an exhaustivelist of API changes.

Summary

The changes for this version are organised around three main themes:error reporting, tidy eval, and tidy dots.

Conditions and errors

Tidy dots

Tidy eval

Environments

Calls

Other improvements and fixes

Lifecycle

Soft-deprecatedfunctions and arguments

rlang 0.3.0 introduces a new warning mechanism for soft-deprecatedfunctions and arguments. A warning is issued, but only under one ofthese circumstances:

In addition, deprecation warnings appear only once per session inorder to not be disruptive.

Deprecation warnings shouldn’t make R CMD check fail for packagesusing testthat. However,expect_silent() can transform thewarning to a hard failure.

tidyeval

Miscellaneous

Deprecated functions andarguments

Deprecated functions and arguments issue a warning inconditionally,but only once per session.

Defunct functions andarguments

Defunct functions and arguments throw an error when used.

Functions andarguments in the questioning stage

We are no longer convinced these functions are the right approach butwe do not have a precise alternative yet.

rlang 0.2.2

This is a maintenance release that fixes several garbage collectionprotection issues.

rlang 0.2.1

This is a maintenance release that fixes several tidy evaluationissues.

rlang 0.2.0

This release of rlang is mostly an effort at polishing the tidyevaluation framework. All tidy eval functions and operators have beenrewritten in C in order to improve performance. Capture of expression,quasiquotation, and evaluation of quosures are now vastly faster. On theUI side, many of the inconveniences that affected the first release ofrlang have been solved:

See the first section below for a complete list of changes to thetidy evaluation framework.

This release also polishes the rlang API. Many functions have beenrenamed as we get a better feel for the consistency and clarity of theAPI. Note that rlang as a whole is still maturing and some functions areeven experimental. In order to make things clearer for users of rlang,we have started to develop a set of conventions to document the currentstability of each function. You will now find “lifecycle” sections indocumentation topics. In addition we have gathered all lifecycleinformation in the?rlang::lifecycle help page. Please onlyuse functions marked as stable in your projects unless you are preparedto deal with occasional backward incompatible updates.

Tidy evaluation

Conditions

Environments

Various features

Bugfixes

API changes

The rlang API is maturing and still in flux. However we have made aneffort to better communicate what parts are stable. We will notintroduce breaking changes for stable functions unless the payoff forthe change is worth the trouble. See?rlang::lifecycle forthe lifecycle status of exported functions.

Breaking changes

Upcoming breaking changes

rlang 0.1.6

rlang 0.1.4

rlang 0.1.2

This hotfix release makes rlang compatible with the R 3.1 branch.

rlang 0.1.1

This release includes two important fixes for tidy evaluation:

New functions:

UI improvements:

Bugfixes:

rlang 0.1.0

Initial release.


[8]ページ先頭

©2009-2025 Movatter.jp