-
Notifications
You must be signed in to change notification settings - Fork 420
Closed
Labels
featurea feature request or enhancementa feature request or enhancementpivoting ♻️pivot rectangular data to different "shapes"pivot rectangular data to different "shapes"
Description
This would match the rectangling functions and I think it generally makes more sense, as you use the transform to do the hard work, then the cast to validate your assumptions.
Lines 317 to 328 in a63a537
| # optionally, cast variables generated from columns | |
| cast_cols <- intersect(names(names), names(names_ptypes)) | |
| for (col in cast_cols) { | |
| names[[col]] <- vec_cast(names[[col]], names_ptypes[[col]]) | |
| } | |
| # transform cols | |
| coerce_cols <- intersect(names(names), names(names_transform)) | |
| for (col in coerce_cols) { | |
| f <- as_function(names_transform[[col]]) | |
| names[[col]] <- f(names[[col]]) | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementpivoting ♻️pivot rectangular data to different "shapes"pivot rectangular data to different "shapes"