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
Issue: map_* functions no longer works when calling an active binding of an R6 class.
map_*
Reprex:
Numbers <- R6::R6Class("Numbers", public = list( x = 100 ), active = list( x2 = function(value) { if (missing(value)) return(self$x * 2) else self$x <- value/2 }, rand = function() rnorm(1) ) ) n1 <- Numbers$new() n1[["x2"]] # > [1] 200 n2 <- Numbers$new() n2[["x2"]] # > [1] 200 nn <- list(n1, n2) purrr::map_dbl(nn, "x2") # > Error: `x` must be a vector (not a environment)
Session:
> session_info() Session info ------------------------------------------------------------------------------------ setting value version R version 3.3.1 (2016-06-21) system x86_64, darwin15.6.0 ui RStudio (0.99.1246) language (EN) collate en_AU.UTF-8 tz Australia/Sydney date 2016-07-03 Packages ---------------------------------------------------------------------------------------- package * version date source devtools * 1.12.0 2016-06-24 CRAN (R 3.3.0) digest 0.6.9 2016-01-08 CRAN (R 3.3.0) magrittr 1.5 2014-11-22 CRAN (R 3.3.0) memoise 1.0.0 2016-01-29 CRAN (R 3.3.0) purrr 0.2.2 2016-06-18 CRAN (R 3.3.0) R6 2.1.2 2016-01-26 CRAN (R 3.3.0) Rcpp 0.12.5 2016-05-14 CRAN (R 3.3.0) rsconnect 0.4.3 2016-05-02 CRAN (R 3.3.0) withr 1.0.2 2016-06-20 CRAN (R 3.3.0)
The text was updated successfully, but these errors were encountered:
Related to #200: extract_impl() needs to be taught about environments
extract_impl()
Sorry, something went wrong.
1fde13d
No branches or pull requests
Issue:
map_*
functions no longer works when calling an active binding of an R6 class.Reprex:
Session:
The text was updated successfully, but these errors were encountered: