Code for minimum/maximum/average value for selected rows (Colomn wise values)?

Are you trying to use data in the slice?

It should be subset_dat <- slice(data, 5:9) if you are. Although, not sure what your data is like.

Then notice the as.matrix in the code by @AlexisW, which you haven't included.

      min_x_y = matrixStats::rowMins(as.matrix(subset_dat)))

Anyway, it would be much easier if you could provide a reproducible example:

1 Like