0

For the following dataframe,

A    B     C    
1    2     3

how do I create a column that is the minimum of my rows so that my dataframe looks like this?

A    B     C    min
1    2     3     1

I've tried doing this, but it hasn't been working as it takes the minimum of the columns A, B, C, not of the row.

library(dplyr)
data_frame %>% mutate(minimum = min(A, B, C))
Mistakamikaze
  • 446
  • 3
  • 19

0 Answers0