-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
Until now I was under the impression that I could use mutate with rowwise. However the following example seems to indicate otherwise:
data.frame(processed=c("foo", "bar")) %>%
rowwise() %>%
mutate(processed_trafo=paste("test", processed))
which results into
processed processed_trafo
1 foo test 2
2 bar test 1
It seems that dplyr is not able to pick up the factor levels.
The example illustrates just the point but does not actually rely on the row-wise grouping. However imagine, the levels are filenames and you want to do something like
file_checksum=(system(paste("md5sum", processed), intern=T) %>% str_split_fixed(" ", 2))[1]
in mutate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels