Skip to content

Commit

Permalink
version 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
crowding authored and cran-robot committed May 24, 2022
1 parent 61b8783 commit dc68f97
Show file tree
Hide file tree
Showing 46 changed files with 1,547 additions and 601 deletions.
23 changes: 12 additions & 11 deletions DESCRIPTION
@@ -1,21 +1,22 @@
Package: nseval
Type: Package
Title: A Clean API for Lazy and Non-Standard Evaluation
Version: 0.4
Date: 2018-08-01
Title: Tools for Lazy and Non-Standard Evaluation
Version: 0.4.2
Date: 2022-05-16
Author: Peter Meilstrup <peter.meilstrup@gmail.com>
Maintainer: Peter Meilstrup <peter.meilstrup@gmail.com>
Description: Facilities to capture, inspect, manipulate, and create
Description: Functions to capture, inspect, manipulate, and create
lazy values (promises), "..." lists, and active calls.
License: GPL (>= 2.0)
Depends:
Suggests: testthat (>= 2.0.0), compiler (>= 3.4), roxygen2 (>= 2.2.2),
knitr (>= 1.2), plyr (>= 1.8.1), ggplot2(>= 1.0.1), lazyeval(>=
0.2.0), stringr(>= 1.2.0)
Encoding: UTF-8
Imports: methods
Suggests: testthat (>= 3.0.0), compiler (>= 3.4), roxygen2 (>= 2.2.2),
knitr (>= 1.2), plyr (>= 1.8.1), lazyeval (>= 0.2.0), stringr
(>= 1.2.0), covr
Collate: 'arg.R' 'caller.R' 'quo.R' 'dots.R' 'getpromise.R'
'conversions.R' 'format.R' 'force.R' 'shortcut.R' 'missing.R'
RoxygenNote: 6.0.1
RoxygenNote: 7.1.2
NeedsCompilation: yes
Packaged: 2018-08-04 04:44:57 UTC; peter
Packaged: 2022-05-24 03:32:45 UTC; peter
Repository: CRAN
Date/Publication: 2018-08-06 17:10:02 UTC
Date/Publication: 2022-05-24 04:40:02 UTC
88 changes: 45 additions & 43 deletions MD5
@@ -1,50 +1,52 @@
04854d49de4b8184b132581e6d470146 *DESCRIPTION
a045d92040e55e04c4649d3d47b02927 *NAMESPACE
0306eb35ff8fe37a4936534906787149 *NEWS.md
f0393c8f1bfe885863173099d7beefa7 *R/arg.R
d59218c1c16f71b0a59acd2d3fa6d29e *R/caller.R
d3a22a777a8efd93a3bd8af0ce531f27 *R/conversions.R
e8b46a86b358e155ea2df4cc6d73f89f *R/dots.R
9b605a89827eb8a973ce90135de80bf0 *R/force.R
170864acf51bf9485fbffd5d0c4cff24 *R/format.R
2e69fc42cb57aab2ba691d36e279a58a *R/getpromise.R
6a0b88746f79695319055256f1f9342e *R/missing.R
3620da0474d80faa47eb90675a6fc73b *R/quo.R
87e5ad8146889de1794e0eef64d9e338 *R/shortcut.R
6e2903d6cfb82c236b74356f70eecaf9 *README.md
bb0dcafc8c98951b8e2d9794298bfa93 *man/arg.Rd
443af45d32bce91960f60734bfcc5538 *DESCRIPTION
ba55a01371a7843e5207ea16cb63ab8f *NAMESPACE
e3e32376b26a206fd67926e2fa4b780e *NEWS.md
a34937b43137b413735fa58669e89584 *R/arg.R
9bf73debbc46e48a5ef73cc3cf9a24ed *R/caller.R
ac2dac02ec51e24fceab98269329099a *R/conversions.R
a730957db1969c6c10a2fae65bbe240e *R/dots.R
75e7dc037daa3b3e0e51431ffff5b775 *R/force.R
45dd2e599664f9520bf60c46ffb0b2dc *R/format.R
921759974fc52efe188ecbe2688a2424 *R/getpromise.R
37bf7f7547f66688862e03a332b9d920 *R/missing.R
941911aebe65cba0a900a9cecf9b191b *R/quo.R
09806ecf5a54ab3cccec151445888574 *R/shortcut.R
1c3e9148194e2accb6dc108666bda483 *README.md
747361c3ad0de03820a3464ff02cb0a2 *man/arg.Rd
f4b9e96876cd17cbc07725cb1d66f499 *man/as.dots.Rd
069438200d36601ab3cf66329aac292d *man/caller.Rd
4d9cd8a486357834a58311e8e73ad447 *man/compat.Rd
76efc1ce367b721f36559962806292f1 *man/do.Rd
ca2581d2726eb258469eef3aead4d225 *man/dots.Rd
3e376b4b47afe1f483041802bf20d84f *man/dots2env.Rd
17080f8b9664524c4fa99090a3b04fc7 *man/env2dots.Rd
78a2f207920ecc42cb280b3084732443 *man/forced.Rd
c995b268167ee2d577b546e061da71b1 *man/format.Rd
f1e7d62d7eebbfaec721446032c1b0f2 *man/function_.Rd
a75a932e36bc35d4137a510900730af7 *man/get_call.Rd
e03dfa07108699946232f6193cd71915 *man/get_dots.Rd
de2b588f12d14eda2e97cc698184114a *man/locate.Rd
17810c3485315c07e865a4f21e5d882e *man/missing_value.Rd
b57ccebf123d29d22b058d06d25e59ee *man/quo.Rd
8a700b685b9bfaea4b83069736251831 *man/shortcut.Rd
5671e7dd9f7ad77360822c2778149353 *man/unwrap.Rd
52823731947949e921886b1b3c6387ce *src/caller.c
54f48c6c69525f5b8deb8dcde3cb720c *src/dots.c
97db9380d9406d2e4f4819771fd64518 *src/getpromise.c
942b70fef59835263be0175757a0f817 *src/init.c
bf080be004f9ac39e92d09202348e8d7 *src/promises.c
8903ffda22f599911140432231aefe74 *man/caller.Rd
9aed8a75482cb49a0d76123debb76f80 *man/compat.Rd
dd8f983d7c8edc850902e5ed2ffc5d6b *man/do.Rd
4407d3257d8c414e76e3bbc3eef369e9 *man/dots.Rd
fa3d49843301d4508e44a50c7c86652c *man/dots2env.Rd
4d57781848d3076426326b622eb90561 *man/env2dots.Rd
628fa9d213c9f7b25dcc1de5cc3e6ff9 *man/forced.Rd
38974dff9f07e913379b2706f4829d28 *man/format.Rd
1125d18e5376b3b40f40b467f4abd1f3 *man/function_.Rd
5e0d5cd44ec93cb606c9d4feffe0c599 *man/get_call.Rd
21d69be58a74bd9449d9fb21758ade6b *man/get_dots.Rd
a14837e40df2b05f89e1499697a03096 *man/locate.Rd
c7b7880dd60141b21e465cb8c9a609ce *man/missing_value.Rd
a3683640c153370729abcc63d3c6ce71 *man/quo.Rd
711b457f786c76490d20807fdda18008 *man/set_.Rd
a9109ed20814e1044d36461e246a32f1 *man/shortcut.Rd
9acb1554e7be44ddceb05bd4bacbae57 *man/unwrap.Rd
d15a9622c695e15649add47fb4aea84f *src/caller.c
d38a397f06691523d268f40a66a49cb4 *src/dots.c
064d91f49bfb5acb77a0796940113b48 *src/getpromise.c
eca3b4eb744d162b77170e43070d58b5 *src/init.c
40493743bb02b9affdef7f86963fd65f *src/promises.c
3a39035e1edbe0f12d19b7ecd5f972af *src/promises.h
3bd2e26851ecac80df9ca458b64c1dfc *src/vadr.c
219390f690b1da909dfeddb478faf551 *src/vadr.h
a1102d2f734f4c38fe27a0a69ce1b146 *src/vadr.h
abb12655ddc379b0ff78ea91bf30c54e *tests/testthat.R
9412dbc55b4842245088f55d34a3b619 *tests/testthat/test-caller-examples.R
435fdc7ba4dba1a5cc00c94efbd56cb2 *tests/testthat/test-caller.R
7eb601f3564f1018545a9976fcceea7c *tests/testthat/test-conversions.R
13aaf992630a16c12382a1956de09a7d *tests/testthat/test-dots.R
0447d3871d0b6a0cb22d987371bf0b8f *tests/testthat/test-format.R
197f06bca46c529fb49454152eac2170 *tests/testthat/test-getpromise.R
370006232673ec435bee4940f2812d3d *tests/testthat/test-caller.R
843bf3671bf333e5e845293fa5d430a0 *tests/testthat/test-conversions.R
7393019b4243dcbd6a5ff1c1090884ff *tests/testthat/test-dots.R
71a52daae40b7981aabb68c0d3969d90 *tests/testthat/test-format.R
158f3ac94eb9ecbbc8f2c5acade697d2 *tests/testthat/test-getpromise.R
36c06ae49ef3b84143dea3ebb63d7ccf *tests/testthat/test-primitive.R
a31984d461ab471b43355c1701c7347f *tests/testthat/test-promises.R
63f7d494d988f7ee961be64da38bbb10 *tests/testthat/test-with_caller.R
0d4e89e3a924102039ffb010d8df6da5 *tests/testthat/test-with_caller.R
020256e6fbd6af0d422b818ad29ec1c0 *tests/testthat/test-wrong.R
25 changes: 23 additions & 2 deletions NAMESPACE
@@ -1,11 +1,11 @@
# Generated by roxygen2: do not edit by hand

S3method("[",dots)
S3method("[<-",dots)
S3method("env<-",quotation)
S3method("envs<-",dots)
S3method("expr<-",quotation)
S3method("exprs<-",dots)
S3method(all.equal,quotation)
S3method(as.data.frame,dots)
S3method(as.dots,default)
S3method(as.dots,dots)
Expand Down Expand Up @@ -35,6 +35,21 @@ S3method(forced,quotation)
S3method(format,dots)
S3method(format,oneline)
S3method(format,quotation)
S3method(is_default_,default)
S3method(is_default_,dots)
S3method(is_default_,quotation)
S3method(is_forced_,default)
S3method(is_forced_,dots)
S3method(is_forced_,quotation)
S3method(is_literal_,default)
S3method(is_literal_,dots)
S3method(is_literal_,quotation)
S3method(is_missing_,default)
S3method(is_missing_,dots)
S3method(is_missing_,quotation)
S3method(is_promise_,default)
S3method(is_promise_,dots)
S3method(is_promise_,quotation)
S3method(missing_,default)
S3method(missing_,dots)
S3method(missing_,quotation)
Expand Down Expand Up @@ -84,13 +99,15 @@ export(function_)
export(get_call)
export(get_dots)
export(get_function)
export(is.quo)
export(is.quotation)
export(is_default)
export(is_default_)
export(is_forced)
export(is_forced_)
export(is_literal)
export(is_literal_)
export(is_missing)
export(is_missing_)
export(is_promise)
export(is_promise_)
Expand All @@ -106,16 +123,19 @@ export(missing_)
export(missing_value)
export(quo)
export(quo_)
export(set_)
export(set_arg_)
export(set_dots)
export(set_enclos_)
export(unwrap)
export(value)
export(values)
importFrom(methods,is)
useDynLib(nseval,"_arg")
useDynLib(nseval,"_arg_dots")
useDynLib(nseval,"_arg_env")
useDynLib(nseval,"_arg_expr")
useDynLib(nseval,"_do")
useDynLib(nseval,"_construct_do_call")
useDynLib(nseval,"_dots_envs")
useDynLib(nseval,"_dots_exprs")
useDynLib(nseval,"_dots_to_env")
Expand All @@ -133,4 +153,5 @@ useDynLib(nseval,"_locate")
useDynLib(nseval,"_quotation")
useDynLib(nseval,"_quotation_literal")
useDynLib(nseval,"_quotation_to_promsxp")
useDynLib(nseval,"_remove")
useDynLib(nseval,"_set_dots")
22 changes: 22 additions & 0 deletions NEWS.md
@@ -1,3 +1,25 @@
# nseval 0.4.2

Fixes:
* Fixed handling of missing arguments in `do` and `quo`
* `do` now passes arguments via a temporary binding of `...` in some
cases. This should fix some cases where `sys.calls()` returned naked
promises, which made for confusing debugging.
* Fixed man pages which were not generated completely.
* `locate(fn, mode="function")` now works in the case where `x` is
a forced promise containing a function.

Changes:
* Implemented `all.equal` method for `quotation` objects.
* dots and quotation objects now print themselves in a `deparse()`-like style.
* `is_*_()` functions how have methods for promises/dots.
* `set_` and `set_enclos_` are added to help with making assignments.

# nseval 0.4.1

Fixes:
* `caller` now correctly returns its `ifnotfound` argument.

# nseval 0.4

Initial CRAN Release.
17 changes: 10 additions & 7 deletions R/arg.R
Expand Up @@ -25,24 +25,26 @@ arg <- function(sym,
arg_(sym_, env)
}

#' @rdname arg
#' @description
#' `arg_` evaluates the first element normally;
#' `arg(x, e)` is equivalent to `arg_(quote(x), e)`.
#' @rdname arg
#' @export
#' @useDynLib nseval _arg
arg_ <- function(sym, env = arg_env(sym, environment())) {
.Call("_arg", env, as.name(sym), TRUE)
}


#' @rdname arg
#' @description
#' `arg_list` looks up multiple variables, and returns a [dots]
#' object. `arg_list(x, y)` is equivalent to `unwrap(dots(x=x,
#' y=y))`. If any of the requested variables are not bound, an error
#' will be raised.
#'
#' @param ... Bare names (not forced). Arguments may be named; these
#' names determine the names on the output list. If argument names
#' are not given, the input is used as output names
#' names determine the names on the output list. If arguments are
#' not named, the names given are used.
#' @return `args` returns a [dots] object.
#' @note Beware of writing `arg_list(a, b, ...)` which probably
#' doesn't do what you want. This is because R unwraps `...` before
Expand All @@ -53,7 +55,6 @@ arg_ <- function(sym, env = arg_env(sym, environment())) {
#' function inputs to an active function.
#' @return `arg_list` returns a [dots] object.
#' @seealso dots get_dots unwrap
#' @rdname arg
#' @export
#' @useDynLib nseval _arg_dots
#' @useDynLib nseval _dotsxp_to_flist
Expand All @@ -63,10 +64,11 @@ arg_list <- function(...) {
}


#' @rdname arg
#' @description
#' `arg_list_` is a normally evaluating version of `arg_list`;
#' `arg_list(x, y)` is equivalent to
#' `arg_list_(alist(x, y), environment())`.
#' @rdname arg
#' @param syms A character vector or list of names.
#' @param envs An environment, or a list of environments, to look for
#' the bindings in.
Expand All @@ -82,13 +84,14 @@ arg_list_ <- function(syms, envs) {
}


#' @rdname arg
#' @description
#' `set_arg` and set_arg_ create bindings from quotations. They
#' replace base function [delayedAssign].
#' @param dst A name; for `set_arg` this is quoted literally; for
#' `set_arg_` this should be a [quotation].
#' @param src A [quotation] (or something that can be converted to a
#' quotation, like a formula).
#' @rdname arg
`set_arg` <- function(dst, src) {
dst_ <- arg_(quote(dst), environment())
set_arg_(dst_, src)
Expand Down

0 comments on commit dc68f97

Please sign in to comment.