How to check multiple columns for value in R

Can you show what you expect the output would be for this example?


Also, I've added some formatting to the code in your post. In general, you can do the same by adding three backticks before and after your code. So, in the post editing box, you would type:

Blah blah blah

```
x <- 1 + 2
```

Yaddah yaddah

And this would show up as:

Blah blah blah

x <- 1 + 2

Yaddah yaddah

You can read more about it here:

1 Like