# proper specification
dist <- list(x=c(1,2,3),fx=c(1/3,1/3,1/3))
check.dist(dist) # fine
# duplicates are not allowed
dist1 <- list(x=c(1,2,2),fx=c(0.1,0.2,0.7))
#check.dist(dist1) # would throw an error
# remove the duplicate
dist1 <- dist.unique.events(dist1)
check.dist(dist1) # fine
Run the code above in your browser using DataLab