Add 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
)

Arguments

variables

The variables data frame.

varlocations

The varlocations matrix.

varbox_x_size

Vector of box width for each variable.

varbox_y_size

Vector for box height for each variable.

varspace_x_size

Vector for horizontal spacing.

varspace_y_size

Vector for vertical spacing.

Value

The original variables data frame with location information added.

Details

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.