ipu_matrix {ipfr} | R Documentation |
This function simplifies the call to 'ipu()' for the simple case of a matrix and row/column targets.
ipu_matrix(mtx, row_targets, column_targets, ...)
mtx |
a |
row_targets |
a vector of targets that the row sums must match |
column_targets |
a vector of targets that the column sums must match |
... |
additional arguments that are passed to 'ipu()'. See
|
A matrix
that matches row and column targets
mtx <- matrix(data = runif(9), nrow = 3, ncol = 3)
row_targets <- c(3, 4, 5)
column_targets <- c(5, 4, 3)
ipu_matrix(mtx, row_targets, column_targets)