This is more of an educaitonal question, I am trying to spin my head around map function in R (Do let me know if thats obsolete already). But what I want is sum of all numeric columns & I am trying this
iris %>% select(map(c('Sepal.Length','Sepal.Width','Petal.Length','Petal.Width')),rowSums,vars=colnames(.))
Error received is
Error in as_mapper(.f, ...) : argument ".f" is missing, with no default
I know its wrong but I want to understang basic concept/fundamental behind this rather than just getting right answer, little explanation would really help. Also, do let me know if there is a better way to do this in tidyverse itself