imageInteraction(data, x, y, z, plot = TRUE, legend = TRUE, ...)
anchored.gradient
.image
function is quite useful for displaying two-way quantitative interactions (variable X on the X axis,
variable Y on the Y axis, and z represented as a color). However, this function requires a matrix where the cells (r_ij) represent the Z value
in the ith value of x and jth value of y. Getting it into matrix form can be annoying if it natively comes in long-column format. This function
takes a data matrix, conditions as well as z in the columns, and returns an image matrix.image