How to realize rowSum with collapse?
ret$mitNachA <-mitNachA %>% dplyr::mutate(sumVar=rowSums(.[2:51]))
ret$mitNachB <-mitNachB %>% dplyr::mutate(sumVar=rowSums(.[2:13]))
It would be easier to help if you posted some example data and the expected results, as described here.
and what is collapse ?