##This is the code that I ran in R. I run this and there is no output anywhere at all. I cant figure out why.
polarizerset <- function(x){
fw <- c()
ps <- c(0,1)
sw <- sample(x, 1, prob = c(0.5,0.5))
sp <- sample(ps, 1, prob = c(0.5,0.5))
if( xor(sw,sp) == FALSE ) {
fw <- c(fw, as.numeric(!sw), as.numeric(!sw))
} else {
fw <- c(fw, NULL, NULL)
}
}