You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you can't fix it, the blog post is a little inconsistent about whether this will work. The paragraph after the code block implies it will work for c()
Luckily tidyselect 0.2.0 also introduces a few features that help writing safer code for data expressions. First, the support for strings and character vectors has been improved. All data expressions fully support strings. It is now valid to supply strings to - and ::
...
Note that this only applies to c(), - or : because it would not make sense to write seq("name", "mass")
The text was updated successfully, but these errors were encountered:
That's true within tidyverse packages, but I have been using c() for srvyr, in functions structured like mutate_at(), as an alternative to requiring users to use vars() around the variables. (a little more discussion here: tidyverse/dplyr#2685)
And yes, that example isn't great, I just wanted to show that things that work with : don't always work with c(). I think these might actually come up in real world usage:
Was testing things out after reading Hadley's blog post, and found this edge case:
When using
c()
, we still get errors when combining string names and column numbers. Is it possible to work around this, as in:
?If you can't fix it, the blog post is a little inconsistent about whether this will work. The paragraph after the code block implies it will work for
c()
The text was updated successfully, but these errors were encountered: