I have a list that gives me the number of occurrences of numbers 1, 2, 3 and
 4.


Sometimes a single in a casa just appears 0 and 1, in others only 2, and every
combination you can think of.


Eg


> Caso [1:2]
$ `9`


0 1
2 10


$ `13`


0 2
2 4


Can I turn it into a matrix consisting of 4 columns in which I put the
number of occurrences of the previous numbers, and for cases where it does
not appear any of those values put 0?


Regards,


Sebastian.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to