powered by
addStateMatrix(newMatrix, oldMatrix, stateName=paste("state", after+1, sep=" "), after=dim(oldMatrix)[1], newCell="NULL")
newMatrix
newCell
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)
Run the code above in your browser using DataLab