R/add_locations.R
add_locations.RdAdd x,y location information Helper function called by prepare_diagram. Likely not useful for direct calling.
add_locations(
variables,
varlocations,
varbox_x_size,
varbox_y_size,
varspace_x_size,
varspace_y_size
)The variables data frame.
The varlocations matrix.
Vector of box width for each variable.
Vector for box height for each variable.
Vector for horizontal spacing.
Vector for vertical spacing.
The original variables data frame with location information added.
varlocations needs to be a matrix.
varbox_x_size and varbox_y_size need to be vectors
of length corresponding number of variables.
varspace_x_size and varspace_y_size need to be vectors
of length corresponding to cols/rows in varlocations minus 1.
prepare_diagram ensures inputs are provided in the required form.