Sometimes, diseases may have multiple states, for example a different stage of cancer or kidney disease. This function processes
comorbid_columns that have multiple states
and processes them to a new
master_str which is made up of 0s and 1s only.
The intended use is to run this on data that has multiple states, merge the
master_str to the original data on the basis of the
make_stem can then be run on this data.
A vector of character strings made up of numbers 0-9 or of factors coercible to character, all should be identical lengths.
A list of disease names associated with each position as used in
dis_names is passed, then a list, the first element of which is a data.frame, the second is a vector of new names.
comorbid_column is passed, then only a data.frame is returned which includes:
comorbid_column passed to the function
The frequency of that
The new string that has been returned
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.