you can play with options addand whatlike this
beanplot(x[colpref==3],ll = 1, col = c(0,3,3,3), what=c(1,0,1,1),
side = "both", axes = FALSE,method = "stack", add=FALSE)
beanplot(x[colpref==5],ll = 1, col = c(0,5,5,5), what=c(1,0,1,1),
side = "both", axes = FALSE,method = "stack", add=TRUE)
beanplot(x,ll = 1, col = c(0,5,5,5), what=c(0,1,0,0),
side = "both", axes = FALSE,method = "stack", add=TRUE)
