Description Usage Arguments Value
Membership is assumed to be described by a set of integers stored in the variable.
1 | make01MemberMatrix(pInDT, pPrefix)
|
pInDT |
a data.table with two columns: SID and some integer variable |
pPrefix |
a string indicating the prefix to give to each category-specific column of the output |
A data.table with the same two columns as the input DT, plus k new columns, one for each unique category (i.e. value) in the 2nd column of pInDT. Let 'str' be the value of 'pPrefix'; and suppose the categories are numbered 1, 2, ... then the columns will have the names str1, str2, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.