x <- sample(1:3, 1) if(x==1){ print("Spencer") } else { if(x==2){ print("Brittany") } else { print("Sarah") } }
## [1] "Brittany"