View source: R/plot.hosp_network.R
plot.hosp_network | R Documentation |
hosp_network
ObjectCreate a network graph of your patient location history data
## S3 method for class 'hosp_network' plot( x, by = c("unit", "room"), type = c("simple", "hub score", "authority score"), ... )
x |
An object of class |
by |
Two options, either |
type |
Three options, either |
... |
Additional arguments to be passed to |
edge.arrow.size
, edge.curved
, vertex.label
, vertex.label.cex
, vertex.size
, asp
, layout
, and main
are the plot.igraph
options already given by this function, so to do more customization, please choose other options.
Returns NULL, invisibly, as plot.igraph
is used to output the plot
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 hn_object <- hosp_network(x = cleaned_hn_data, fromUnit = UnitName, toUnit = next_unit, fromRoom = RoomNumber, toRoom = next_room) # create an object of class hosp_network plot(hn_object) # plot the hosp_network object using the unit data and type = simple, as those are the default options plot(hn_object, by = "room", type = "hub score") # plot hosp_network object using room data and type = hub score plot(hn_object, by = "unit", type = "authority score", vertex.color = "red") # plot hosp_network object using unit data, type = authority score, and vertex color = red
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.