# NOT RUN {
# Return the multiset [[1],3], [[2],1] from the input vector (1,2,1,1)
list2m(c(1,2,1,1 ))
# Return the multiset [[1,2],2], [[2,3],1] from the input list (c(1,2),c(2,3),c(1,2))
list2m(list(c(1,2),c(2,3),c(1,2)))
# }
Run the code above in your browser using DataLab