This question is very similar to this one: Min and Median of Multiple Columns of a DF by Row in R And I know has been asked in a variety of ways, but I don't feel that they adequately address my question.
I have a data frame with 260ish columns. I'd like to get the median of every row, preferably using dplyr as its what I'm comfortable with. The answer from the above linked question is almost perfect, doing something like:
df %>%
rowwise() %>%
mutate(median = median(c(V1, V2, V3)))
Would work and accomplish exactly what I ask, but much like this question: Sum across multiple columns with dplyr
I'd rather not write out the names of 260ish columns. Is there a way to take the above command and modify it so it inputs all 260 columns?