[datatable-help] Treating a group of variables as independent

Marco_Notar mnotarangelo at uri.edu
Thu Apr 12 22:19:57 CEST 2018


Hi all, 

I'm wondering if any of you are aware of a package that allows users to
transform a data table from:

Data Name    #
A                  3
B                  2

to:

Data Name    #
A                  1
A                  1
A                  1
B                  1
B                  1


I've tried using the table2df function in the psych() package but that
doesn't yield the results i'm interested in; I'm essentially interested in
turning a row with a value of X, into X number of rows with value of 1 for
said category.


Thanks,
Marco. 






--
Sent from: http://r.789695.n4.nabble.com/datatable-help-f2315188.html


More information about the datatable-help mailing list