View source: R/clean_hosp_network.R
clean_hosp_network | R Documentation |
To use other hospital network functions in this package, your data must have columns for: patient's first unit and patient's next unit or patient's first room and patient's next room. There might be multiple rows per patient, but each row should always have a beginning and ending room and/or unit for each encounter. This function might be able to help get your data in that format.
clean_hosp_network( data, uniqueID, startDate, endDate, unitName = NULL, roomNum = NULL )
data |
A |
uniqueID |
An unquoted column name for the unique identifier for each encounter or patient |
startDate |
Unquoted column name for the column containing the start date for an encounter |
endDate |
Unquoted column name for the column containing the end date for an encounter |
unitName |
Optional, unquoted column name for the column containing the unit name data |
roomNum |
Optional, unquoted column name for the column containing the room number data |
A data.frame
containing the cleaned patient location history data
hn_data <- hosp_network_data # read in example data provided in package cleaned_hn_data <- clean_hosp_network(data = hn_data, uniqueID = UniqueEncountID, startDate = BeginDate, endDate = EndDate, unitName = UnitName, roomNum = RoomNumber) # clean the data using specific columns in the dataset cleaned2 <- clean_hosp_network(data = hn_data, uniqueID = UniqueEncountID, startDate = BeginDate, endDate = EndDate, roomNum = RoomNumber) # clean the data again, but omit the unit name data cleaned3 <- clean_hosp_network(data = hn_data, uniqueID = UniqueEncountID, startDate = BeginDate, endDate = EndDate, unitName = UnitName) # clean the data again, but omit the room number data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.