grandparent_dsm {PRA} | R Documentation |
Risk-based 'Grandparent' Design Structure Matrix (DSM).
grandparent_dsm(S, R)
S |
Resource-Task Matrix 'S' giving the links (arcs) between resources and tasks. |
R |
Risk-Resource Matrix 'R' giving the links (arcs) between risks and resources. |
The function returns the Risk-based 'Grandparent' DSM 'G' giving the number of risks shared between each task.
# Set the S and R matrices and print the results.
S <- matrix(c(1, 1, 0, 0, 1, 0, 0, 1, 1), nrow = 3, ncol = 3)
R <- matrix(c(1, 1, 1, 1, 0, 0), nrow = 2, ncol = 3)
cat("Resource-Task Matrix:\n")
print(S)
cat("\nRisk-Resource Matrix:\n")
print(R)
# Calculate the Risk-based Grandparent Matrix and print the results.
risk_dsm <- grandparent_dsm(S, R)
cat("\nRisk-based 'Grandparent' DSM:\n")
print(risk_dsm)