Description Usage Arguments Value Examples
Adds a new state to a transitions functions matrix.
1 2 3 | addStateMatrix(newMatrix, oldMatrix,
stateName=paste("state", after+1, sep=" "),
after=dim(oldMatrix)[1], newCell="NULL")
|
newMatrix |
an empty matrix with one more row and one more column than the old |
oldMatrix |
a matrix to which we are adding a new state; |
stateName |
the name of the state to be added; |
after |
the number of the state after which a new state should be added |
newCell |
the value in the state to be added; |
newMatrix
a matrix created by adding a new state with the value newCell
to the old matrix
1 2 3 4 5 | M <- generateHazardMatrix(5)
largeM <- generateHazardMatrix(6)
oldM <- M@list.matrix
newM <- largeM@list.matrix
M_addedState <- addStateMatrix(newM, oldM, stateName ="newState", after =3, newCell=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.