Applying a function to every row of a table using dplyr?
As of dplyr 0.2 (I think) rowwise() is implemented, so the answer to this problem becomes: iris %>% rowwise() %>% mutate(Max.Len= max(Sepal.Length,Petal.Length)) Non rowwise alternative Five years (!) later this answer still gets a lot of traffic. Since it was given, rowwise is increasingly not recommended, although lots of people seem to find it intuitive. … Read more