dataframe %>%
select(thumb_p1_frac_1, thumb_p1_frac_2, thumb_p1_frac_3, thumb_p1_frac_4, thumb_p1_frac_5) %>%
mutate(P1 = rowSums(., na.rm = TRUE))
above works, but I want to remove the pipe of select and implement select select in mutate, like
dataframe %>%
mutate(P1 = rowSums(., select(thumb_p1_frac_1, thumb_p1_frac_2, thumb_p1_frac_3, thumb_p1_frac_4, thumb_p1_frac_5), na.rm = TRUE))
it says:
no applicable method for 'select_' applied to an object of class "c('double', 'numeric')"