I have a data frame that has 238 rows and 10 columns. I want to create a new column at the end that contains a dummy variable that says "yes" if the number "1" exists in any or the 10 columns and "no" if none of the columns have "1" in them. I tried
df$dummy = (ifelse(any(x == 1) %in% df[], 'yes', 'no'))
view(df)
but it didn't work. Any input would be greatly appreciated!