matvect it is a helper function to multiply matrices with vector by rows or columns

matvect(df, x, by = "row")

Arguments

df

Numeric Data-frame or matrix.

x

Numeric vector.

by

Character, with two value "row" or "col"

Value

data-frame

Note

This function multiplies matrices with vectors by rows or colums. If by = "row" all values of each row will be multiplied with each value of the vector x. If by = "col" all values of each column will be multiplied with each value of the vector x.

Examples

if (FALSE) { # Do not run data(net) veh <- age_ldv(net$ldv[1:4], agemax = 4) matvect(veh, 1:4) }