adjust the dimensions of a source object to the dimensions of a target object
adjust_mat(
source,
target,
remove = TRUE,
add = TRUE,
value = NA,
returnlabels = FALSE
)
Matrix
A matrix which should be adjusted (one-mode & directed).
A matrix (one-mode & directed) to which the source object is compared with regard to its labels.
Should rows and columns that are not present in the target object be removed?
Should rows and columns that are present in the target object but not in the source object be added to the source object?
The value to be inserted if a new row or column is added. By default, new cells are filled with NA values, but other sensible values may include -Inf or 0.
Return a list of added and removed row and column labels rather than the actual matrix, vector, or network object?