# NOT RUN {
obj <- CatDirichlet(gamma=list(alpha=rep(1,26),uniqueLabels = letters))
x <- sample(letters,size = 20,replace = TRUE)
w <- runif(20)
posterior(obj=obj,ss=x)
obj
posteriorDiscard(obj=obj,ss=x)
obj
## weighted sample
posterior(obj=obj,ss=x,w=w)
obj
posteriorDiscard(obj=obj,ss=x,w=w)
obj
# }
Run the code above in your browser using DataLab