clean_data {socialrisk} | R Documentation |
Prepare our administrative data for analysis
Description
clean_data
returns a dataset which has been transformed and cleaned for subsequent functions in this
package.
Usage
clean_data(dat = NULL, style = "long", id = NULL, prefix_dx = "dx")
Arguments
dat |
dataset |
style |
long, the default, is one diagnosis column per row whereas wide is multiple diagnosis columns |
id |
unique patient identifier variable name |
prefix_dx |
the variable prefix for the diagnosis columns (defaults to "dx"), in quotes |
Details
This function takes our raw administrative data, in a number of different forms, and prepares it in a way which allows the other functions in this package to easily work with it. It is recommended to run this package on all data regardless of setup.
Value
dataframe with multiple rows per patient, which has re-structured their administrative data
Examples
clean_data(dat = i10_wide, id = patient_id, style = "wide", prefix_dx = "dx")
[Package socialrisk version 0.5.1 Index]