How to transform many columns of TRUE/FALSE/NA to just TRUE/FALSE?
I found that this works (though I'm interested if there's a better way - eg. avoiding the loop, or being able to exclude the columns by name instead of being just first 8).

for (i in 8:ncol(data)){
  data[,i] &lt;- sapply(data[,i], isTRUE)
}