Skip to content

fix object not found warning in "%<a-%"#39

Merged
hadley merged 1 commit into
hadley:masterfrom
leeper:patch-1
Jun 19, 2015
Merged

fix object not found warning in "%<a-%"#39
hadley merged 1 commit into
hadley:masterfrom
leeper:patch-1

Conversation

@leeper

@leeper leeper commented Jun 18, 2015

Copy link
Copy Markdown
Contributor

The %<a-% produces an object 'x' not found warning when trying to overwrite an existing active binding, for example:

library("pryr")
a <- 1
b %<a-% (a+1)
a
# [1] 1
b
# [1] 2
b %<a-% (a+2)
# Warning message:
# In rm(x, envir = env) : object 'x' not found
a
# [1] 1
b
# [1] 3

Switching to the list argument in rm solves the problem.

@hadley

hadley commented Jun 18, 2015

Copy link
Copy Markdown
Owner

Good catch - thanks! Could you please add a bullet to NEWS?

@leeper

leeper commented Jun 18, 2015

Copy link
Copy Markdown
Contributor Author

Done.

hadley added a commit that referenced this pull request Jun 19, 2015
fix object not found warning in "%<a-%"
@hadley hadley merged commit 134a660 into hadley:master Jun 19, 2015
@hadley

hadley commented Jun 19, 2015

Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants