Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address() changes the NAMED status #24

Closed
mtmorgan opened this issue Aug 21, 2014 · 0 comments
Closed

address() changes the NAMED status #24

mtmorgan opened this issue Aug 21, 2014 · 0 comments

Comments

@mtmorgan
Copy link

This illustrates the issue

> x = 1:5; .Internal(inspect(x)) 
@92fcbc8 13 INTSXP g0c3 [NAM(1)] (len=5, tl=0) 1,2,3,4,5
> address(x); .Internal(inspect(x))
[1] "0x92fcbc8"
@92fcbc8 13 INTSXP g0c3 [NAM(2)] (len=5, tl=0) 1,2,3,4,5

and a confusion caused by it, where x is replaced rather than updated

> x = 1:5; .Internal(inspect(x)); x[] = cumsum(x); .Internal(inspect(x))
@9684540 13 INTSXP g0c3 [NAM(1)] (len=5, tl=0) 1,2,3,4,5
@9684540 13 INTSXP g0c3 [NAM(1)] (len=5, tl=0) 1,3,6,10,15
> x = 1:5; address(x); x[] = cumsum(x); address(x)
[1] "0x9ebed00"
[1] "0x9ebec70"
@hadley hadley closed this as completed in 250d6fb Aug 21, 2014
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

No branches or pull requests

1 participant