Learn R Programming

lame (version 1.3.4)

.reorder_newdata_actors: Realign a newdata covariate array to the fit's internal actor order

Description

Reorders the rows and columns of each n x m x p slice by their dimnames so they line up with the fit's stored (sorted) additive / multiplicative effects. Only acts when newdata carries dimnames whose name set exactly matches the fit's; otherwise it falls back to the supplied positional order unchanged (the historical behaviour, correct when the user already passes actors in the fit's order or supplies no names).

Usage

.reorder_newdata_actors(X, row_order, col_order)

Value

X with rows / columns permuted into canonical order, or unchanged.

Arguments

X

an n x m x p array (already promoted from a matrix).

row_order, col_order

canonical actor names from .fit_actor_order.