As you can see, I am having a test variable and on that, I am having a table:
test <- data.table(name = c("mike", "kate", "jeff"), ownership = c("1", "3", "4"), worth = c("1", "2", "3"), tax = c("4", "1", "4"))
I am trying to test if any rows (people) contain a row that contains "1".
I have tried the following but I want my syntax to be a bit more concise.
test <- test[ownership == "1" | worth == "1" | tax == "1", status := "yes"]