I would like to compute one value per row into an additional column. This is the code I'm using:
table <- table %>% rowwise() %>% mutate(result = compute_result(c_across()))
compute_result function gets passed a vector of values. However, I need to get access to the column names from within that function. How would I do that without resorting to manually looping around?