CFM.plotCFGraph: CFM: plot the graph with the stories

View source: R/careFlowMiner.wrapper.R

CFM.plotCFGraphR Documentation

CFM: plot the graph with the stories

Description

Plot the graph containing the stories

Usage

CFM.plotCFGraph(
  objCFM,
  depth = 2,
  starting.ID = "root",
  kindOfGraph = "twopi",
  GraphFontsize = "9",
  withPercentages = TRUE,
  relative.percentages = FALSE,
  proportionalPenwidth = TRUE,
  default.arcColor = "Black",
  arr.States.color = c(),
  predictive.model = FALSE,
  predictive.model.outcome = "",
  predictive.model.skipNodeLabel = c(),
  preserve.topology = FALSE,
  set.to.gray = FALSE,
  set.to.gray.color = "WhiteSmoke"
)

Arguments

objCFM

the careFlowMiner obj.

depth

the depht of the final graph, with the respect of the initial node

starting.ID

the starting node (the default is the root node )

kindOfGraph

the shape of the graph. Can be twopi (by default), neato or circo

GraphFontsize

set to 9 by default

withPercentages

default = TRUE: do you want percentages, on the arcs?

relative.percentages

default = FALSE. If the parameter withPercentages is set to TRUE this define the kind of percentages the graph will present on the edges

proportionalPenwidth

default = TRUE. Do the bolder attribute has to be proportional with the percentage?

default.arcColor

default = black, define the default color for the arcs

arr.States.color

an array by which you can specify for some nodes (key) the associated color(value). E.g. c("Home"="Black","Hospital"="Red")

predictive.model

default = FALSE. If set to TRUE the entire graph will work as a predictive mode, with the probability on each node to reach one or mode final states (indicated in predictive.model.outcome)

predictive.model.outcome

the array of nodes which represent the goals in predicting the evolution. This makes sense if predictive.model is set to TRUE

predictive.model.skipNodeLabel

Shit, I forgot the meaning of this parameter

preserve.topology

default = FALSE. If set to YES it will preserve the topology of the graph even if you change some parameters, by plotting all the nodes, in any case (however, the not useful ones will painted in a softgrey color)

set.to.gray

default = FALSE I don't remember

set.to.gray.color

default = WhiteSmoke the default color for the nodes not used in coputation but only aimed at preserving the topology

Examples

## Not run: 

# instantiate a dataLoader object
library(pMineR)

 tmp.objDL <- dataLoader()
 invisible(tmp.objDL$load.data.frame( mydata = data.frame(myInputCSVData) , IDName = "PatientID",EVENTName = "clinicalEvent",
  dateColumnName = "STRT_DT", format.column.date = "%Y-%m-%d %H:%M:%S" ))
 DLS <- tmp.objDL$getData()

a <- careFlowMiner()
a$loadDataset(DLS = DLS , dateToColumnName = "END_DT",dateToFormat="%Y-%m-%d %H:%M:%S") 

b <- CFM.plotCFGraph(objCFM = a, depth = 4,kindOfGraph = "neato",default.arcColor = "Red", 
              arr.States.color=c("Deces"="Red","intensive care"="Orange","Recovered"="YellowGreen"),
              predictive.model = TRUE, predictive.model.outcome = "Deces", 
              predictive.model.skipNodeLabel = c("Deces","Recovered"), preserve.topology = TRUE )
grViz(b$script)

## End(Not run)

robertogattabs/pMiner.v045b documentation built on Aug. 2, 2022, 1:53 p.m.