# NOT RUN {
list2m(c(1,2,1,1 ))
# Converts the input array to the following multiset [[1],3],[[2],1]
list2m(list(c(1,2),c(2,3),c(1,2)))
# Converts the input list to the following multiset [[1,2],2],[[2,3],1]
# }
Run the code above in your browser using DataLab