MilesMcBain / friendlyeval

A friendly interface to tidyeval/rlang that will excuse itself when you're done.
Other
107 stars 6 forks source link

installing friendlyeval broke dplyr rename #8

Closed dbandyo closed 5 years ago

dbandyo commented 5 years ago

Hi @MilesMcBain ,

I installed your friendlyeval package today to get around my frustration at functionalizing dplyr to work on arbitrary named columns. The function I wrote using friendlyeval::treat_string_as_col() works beautifully... BUT in the course of installing friendlyeval from github (and its dependencies, including rlang), I seem to have screwed up dplyr's rename.

Very simple reproducible example from a site that I was reading about this bug:

iris %>% as_tibble() %>% rename(my_species = Species) Error: my_species = Species must be a symbol or a string, not a formula Call rlang::last_error() to see a backtrace

This is true even after I uninstall rlang and try to install it (version 0.3.1) from CRAN rather than Github as advised in researching this bug on the web.

Have you seen this before with your package? Can you guide me (a newish R programmer) on how to get dplyr rename (and perhaps other aspects) working correctly again?

MilesMcBain commented 5 years ago

Hi there I'm glad to hear it helped somewhat. Sorry that something has broken in the process though!

If this were me, my first thought would be that maybe I need to update dplyr to work with the new rlang. I'd be really surprised if the CRAN versions of rlang and dplyr didn't work together properly.

It's very unlikely this is due to friendlyeval as it can't really interfere with these packages, it's downstream from rlang and knows nothing about dplyr.

dbandyo commented 5 years ago

Thanks! I tried the updates to latest dev versions of dplyr and rlang and it messed up further dplyr functions. What fixed it for me is upgrading to R 3.5.2 (from 3.4.1), installing the latest version of RStudio for Windows just in case, then installing all the dplyr etc. packages from CRAN cleanly followed by friendlyeval from github. Everything working now - let's close this issue.