I did mtcars %>% by_row(sum)
but got the message:
by_row()
is deprecated; please use a combination of: tidyr::nest(); dplyr::mutate(); purrr::map()
My naive approach is this
mtcars %>%
group_by(id = row_number()) %>%
nest(-id) %>%
mutate(hi = map_dbl(data, sum))
Is there a way to do it without creating an "id" column?