set.seed(99)
a <- rbinom(10, 4, 0.4)
table(a)
x <- runif(10)
df <- data.frame(a=factor(a), x=x)
(b <- bMM(df))
(b <- bMM(df, numcut=9))
(b <- bMM(df, numcut=9, usequants=TRUE))
if (FALSE) {
## this is an error
f <- bMM(as.character(a))
}
Run the code above in your browser using DataLab