# NOT RUN {
x <- sample(1L:10L,size = 4,replace = TRUE)
obj <- CatDP()
w <- runif(4)
## return an object of class "ssCatDP" contains the weighted counts of each unique integer
sufficientStatistics_Weighted(obj=obj,x=x,w=w)
## return x itself, no matter what w is
sufficientStatistics_Weighted(obj=obj,x=x,w=w,foreach = TRUE)
# }
Run the code above in your browser using DataLab