adds ptype2 and cast support for vctrs #180
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following directions on vctrs issue 1730, I used the vctrs FAQ to implement self-self comparison in the
formattable.R
This adds a dependency import of vctrs ptype2 and cast.
Previously, this would fail the vctrs check
Now, it works
This allows pivot longer from currency formatted items (and other tidyr functions that check for compatibility).
However, there are some implications because the class of object is
formattable
and not, say currency or commaIf you do something that might be erroneous, like make a vector that combines currency and comma, it will mutate both to the attributes of the first
Closes #155