powered by
spam
ifelse( diag.spam(2)*c(0,1), TRUE, FALSE)
Run the code above in your browser using DataLab