I have a dataset that kind of look like this:
NAME JOB TITLE ROLE DESCRIPTION
Mark Cyber specialist N/A
Peter Manager Manager with focus on cyber
Steven CFO N/A
Lucas VP General manager technology safety
Now I want to create an extra column which indicates if the job of the person is cyber related. But there have to be a 1 (cyber related) at Mark, Peter and Lucas. So, there should be looked at 2 columns instead of one. If the condition is only based on 1 column I know that the code should look like this:
pattern <- paste(c("cyber", "Cyber", "technology", "Technology", "computer", "Computer"), collapse = "|")
df <- df %>%
mutate(`Cyber Job` = ifelse(str_detect('column', pattern), 1, 0))
But i don't know how the code should look like if the condition is based on two columns