Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
pivot_longer: when .value needs to be described by two distinct parenthesis? #619
Let us say my column name is
But now if my first .value pattern needs to be described by two distinct parenthesis, this will create a problem! What is the suggested solution? Obviously, I could make all longer, then selective wider, or use the *_spec way, but maybe could have a neater direct solution?
Created on 2019-04-26 by the reprex package (v0.2.1)
I’ll need to think about this for a bit. I think this is sufficiently esoteric it would fine to require a spec, but maybe there’s a simple way to allow multiple value columns (and at least we should generate a better error message).
If it turns out the spec is needed, can I include this dataset in the vignette as another example of where the spec is useful?
Thanks for looking at this!
And yes, please feel free to use that dataset for sure!
Otherwise, if one wanted a slightly more realistic one, could image we got a wide dataset from worldbank, where the indicator (spread ) reads
Created on 2019-04-28 by the reprex package (v0.2.1)
In the world bank case though, I think you'd use
I'm now pretty sure we can just make this work in