We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For a POSIXlt vector x0
x0
After x <- x0 vec_slice(x,1) <- another does not only change the value of x, it also changes the value of x0 . Is this expected?
x <- x0
vec_slice(x,1) <- another
x
library(vctrs) # `[<-` works as expected (clones x) x0_reference <- as.POSIXlt("2020-11-01") x0 <- as.POSIXlt("2020-11-01") another <- as.POSIXlt("9020-11-01") x <- x0 x[1] <- another identical(x0, x0_reference) # TRUE identical(x , x0 ) # FALSE # # `vec_slice<-` does not clone # x0_reference <- as.POSIXlt("2020-11-01") x0 <- as.POSIXlt("2020-11-01") another <- as.POSIXlt("9020-11-01") x <- x0 vec_is(x) # TRUE vec_slice(x,1) <- another # also changes x0 identical(x0, x0_reference) # FALSE identical(x , x0 ) # TRUE
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For a POSIXlt vector
x0
After
x <- x0
vec_slice(x,1) <- another
does not only change the value of
x
,it also changes the value of
x0
.Is this expected?
The text was updated successfully, but these errors were encountered: