add_locations: Add x,y location information Helper function called by...

View source: R/add_locations.R

add_locationsR Documentation

Add x,y location information Helper function called by prepare_diagram. Likely not useful for direct calling.

Description

Add x,y location information Helper function called by prepare_diagram. Likely not useful for direct calling.

Usage

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.

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.

Value

The original variables data frame with location information added.


andreashandel/modeldiagram documentation built on July 31, 2023, 10:05 a.m.