Reputation: 129
I want to do df/rowSums(df) in tidyverse.
df/rowSums(df)
I tried df %>% ./rowSums(.) but this does not work.
df %>% ./rowSums(.)
Do you have ideas? Thanks so much!
Upvotes: 0
Views: 128
Reputation: 887251
We can wrap it inside the {}
{}
library(dplyr) df %>% {./rowSums(.)}
Upvotes: 1