I have a data.frame where each row is a tweet, and each row is an attribute ("text", "user", etc.).
I have written a function "processTweet()" that takes in a row of the data.frame and changes 3 columns in the tweet ("X", "Y" and "Z") and returns this modified single-row data.frame.
I'm currently trying to find out how to use something like dplyr or an apply-like function to actually reflect these modifications back in the original data.frame.
I'm aware that I could split the processTweet function into 3, but this would be inefficient since I'd have to do the same logical lookup multiple times.
I've tried using dplyr with rowwise, but I'm obviously doing something wrong, as the changes are not reflected in the tweets data.frame, whereas mutate seems to allow to modify one column, but not several: tweets %>% rowwise() %>% processTweet()