Some simple sample data:
test <- c(rep(\'B\', 10), rep(\'A\', 7), rep(\'C\', 10), rep(\'A\', 3))
#1] "B" "B" "B"