gistlib
# Assuming data frame is named df with columns "col1" and "col2" df$new_column <- apply(df, 1, function(x) min(x, na.rm = TRUE)) 129 chars3 lines
# Assuming data frame is named df with columns "col1" and "col2" df$new_column <- apply(df, 1, function(x) min(x, na.rm = TRUE))
gistlibby LogSnag