[R] tidyverse repeating error: "object 'rlang_mut_env_parent' not found"

David Winsemius dwinsemius at comcast.net
Mon Aug 14 20:10:04 CEST 2017


> On Aug 14, 2017, at 8:37 AM, Szumiloski, John <John.Szumiloski at bms.com> wrote:
> 
> Thanks for the feedback Jeff.  Before I pursue a bug report, let me give a full example:
> 
> ###### begin console output
> 
> R version 3.4.1 (2017-06-30) -- "Single Candle"
> Copyright (C) 2017 The R Foundation for Statistical Computing
> Platform: i386-w64-mingw32/i386 (32-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
> Desktop> library(tidyverse)
> Loading tidyverse: ggplot2
> Loading tidyverse: tibble
> Loading tidyverse: tidyr
> Loading tidyverse: readr
> Loading tidyverse: purrr
> Loading tidyverse: dplyr
> Conflicts with tidy packages --------------------------------------------------------------
> filter(): dplyr, stats
> lag():    dplyr, stats
> Desktop> library(magrittr)
> 
> Attaching package: ‘magrittr’
> 
> The following object is masked from ‘package:purrr’:
> 
>    set_names
> 
> The following object is masked from ‘package:tidyr’:
> 
>    extract
> 
> Desktop> Test <-  read_csv("Test.csv")
> Parsed with column specification:
> cols(
>  Tests1 = col_character(),
>  Tests2 = col_character(),
>  X1 = col_integer(),
>  X2 = col_integer(),
>  Result = col_double()
> )
> Desktop> Test
> # A tibble: 15 x 5
>   Tests1 Tests2    X1    X2 Result
>    <chr>  <chr> <int> <int>  <dbl>
> 1      C      C     3     1   0.58
> 2      C      C     3     3  -0.78
> 3      C      C     2     2  -0.74
> 4      C      C     1     1   1.78
> 5      C      C     1     3   0.91
> 6      A      A     3     1   0.07
> 7      A      A     3     3   0.57
> 8      A      A     2     2   0.37
> 9      A      A     1     1  -1.25
> 10      A      A     1     3   0.73
> 11      B      B     3     1   2.17
> 12      B      B     3     3  -0.02
> 13      B      B     2     2  -0.17
> 14      B      B     1     1   0.37
> 15      B      B     1     3   1.28
> Desktop>
> Desktop> ### dplyr::select
> Desktop>
> Desktop> Test %>% select(Tests, Tests2)
> Error in mut_env_parent(overscope$.top_env, lexical_env) :
>  object 'rlang_mut_env_parent' not found

I don't see a column named "Tests"

> Desktop>
> Desktop> select(Test, Tests, Tests2)
> Error in mut_env_parent(overscope$.top_env, lexical_env) :
>  object 'rlang_mut_env_parent' not found

Ditto

> Desktop>
> Desktop> # tibble::tibble
> Desktop>
> Desktop> Test <- Test %$% tibble(T1=Test1, Y=Result)
> Error in mut_env_parent(overscope$.top_env, lexical_env) :
>  object 'rlang_mut_env_parent' not found

This time I don't see a column names "Test1"

> Desktop>
> Desktop> Test <- tibble(T1=Test[['Test1']], Y=Test[['Result']])
> Error in mut_env_parent(overscope$.top_env, lexical_env) :
>  object 'rlang_mut_env_parent' not found

Ditto

> Desktop>
> Desktop> ### tidyr::nest
> Desktop>
> Desktop> byTest <- Test %>% group_by(Tests1, Tests2)
> Desktop> nest(byTest)
> Error in mut_env_parent(overscope$.top_env, lexical_env) :
>  object 'rlang_mut_env_parent' not found
> Desktop>
> Desktop> ### session information
> Desktop>
> Desktop> version
>               _
> platform       i386-w64-mingw32
> arch           i386
> os             mingw32
> system         i386, mingw32
> status
> major          3
> minor          4.1
> year           2017
> month          06
> day            30
> svn rev        72865
> language       R
> version.string R version 3.4.1 (2017-06-30)
> nickname       Single Candle
> Desktop>
> Desktop> search()
> [1] ".GlobalEnv"        "package:magrittr"  "package:dplyr"     "package:purrr"
> [5] "package:readr"     "package:tidyr"     "package:tibble"    "package:ggplot2"
> [9] "package:tidyverse" "tools:rstudio"     "package:stats"     "package:graphics"
> [13] "package:grDevices" "package:utils"     "package:datasets"  "package:methods"
> [17] "Autoloads"         "package:base"
> Desktop>
> Desktop> sessionInfo()
> R version 3.4.1 (2017-06-30)
> Platform: i386-w64-mingw32/i386 (32-bit)
> Running under: Windows 7 (build 7601) Service Pack 1
> 
> Matrix products: default
> 
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] magrittr_1.5    dplyr_0.7.2     purrr_0.2.3     readr_1.1.1     tidyr_0.6.3
> [6] tibble_1.3.3    ggplot2_2.2.1   tidyverse_1.1.1
> 
> loaded via a namespace (and not attached):
> [1] rvest_0.3.2      lattice_0.20-35  foreign_0.8-69   pkgconfig_2.0.1  xml2_1.1.1
> [6] compiler_3.4.1   stringr_1.2.0    forcats_0.2.0    parallel_3.4.1   readxl_1.0.0
> [11] Rcpp_0.12.12     plyr_1.8.4       cellranger_1.1.0 httr_1.2.1       tools_3.4.1
> [16] nlme_3.1-131     broom_0.4.2      R6_2.2.2         bindrcpp_0.2     bindr_0.1
> [21] scales_0.4.1     assertthat_0.2.0 gtable_0.2.0     stringi_1.1.5    reshape2_1.4.2
> [26] hms_0.3          munsell_0.4.3    grid_3.4.1       colorspace_1.3-2 glue_1.1.1
> [31] lubridate_1.6.0  rlang_0.1.2      psych_1.7.5      lazyeval_0.2.0   haven_1.1.0
> [36] modelr_0
> 
> #################   end console output
> 
> Thanks again for any feedback,
> John
> John Szumiloski, Ph.D.
> Principal Scientist, Statistician
> Pharmaceutical Development / Drug Product Science & Technology
> NBR105-1-1411
> 
> Bristol-Myers Squibb
> P.O. Box 191
> 1 Squibb Drive
> New Brunswick, NJ
> USA
> 08903-0191
> 
> (732) 227-7167
> 
> 
> 
> -----Original Message-----
> From: Jeff Newmiller [mailto:jdnewmil at dcn.davis.ca.us]
> Sent: Monday, 14 August, 2017 10:33 AM
> To: r-help at r-project.org; Szumiloski, John <John.Szumiloski at bms.com>
> Subject: Re: [R] tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
> 
> This sounds an awful lot like a bug. Read the Posting Guide to know what to do about bugs. And delaying making the reprex is _always_ a bad idea.
> --
--

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law



More information about the R-help mailing list