# NOT RUN {
obj <- CatDirichlet(gamma=list(alpha=runif(26,1,2),uniqueLabels = letters))
x <- sample(letters,size = 20,replace = TRUE)
w <- runif(20)
sufficientStatistics(obj=obj,x=x) #return the counts of each unique label
sufficientStatistics_Weighted(obj=obj,x=x,w=w) #return the weighted counts of each unique lable
sufficientStatistics(obj=obj,x=x,foreach = TRUE) #return the sample itself
# }
Run the code above in your browser using DataLab