# NOT RUN {
obj1 <- DP(gamma=list(alpha=1,H0aF="GaussianNIW",parH0=list(m=1,k=1,v=1,S=1)))
obj2 <- DP(gamma=list(alpha=1,H0aF="CatDirichlet",parH0=list(alpha=1,uniqueLabels=letters)))
x1 <- rnorm(100)
x2 <- sample(letters,100,replace = TRUE)
w <- runif(100)
sufficientStatistics_Weighted(obj = obj1,x=x1,w=w)
sufficientStatistics_Weighted(obj = obj2,x=x2,w=w)
sufficientStatistics_Weighted(obj = obj1,x=x1,w=w,foreach = TRUE)
# }
Run the code above in your browser using DataLab