size: Determine Width and Height of a Node

View source: R/S05-dimensions_and_text.R

sizeR Documentation

Determine Width and Height of a Node

Description

Determine the size (width and height) of a node in an existing path diagram.

Usage

size(node)

Arguments

node

A list with x and y coordinates for the bottom, left, top, right, and associated corners for a node (e.g., see output of add_nodes or add_lines_of_text).

Examples

# Base figure
create_base_figure()

# Add nodes
nodes <- add_nodes(
  c( N1 = 'Node-1|x=.25|y=.5',
     N2 = 'Node-2\n  Indent|x=.75|y=.5'
  ),
  output = TRUE
)

# Dimension of nodes in diagram
size( nodes$N1 )
size( nodes$N2 )


rettopnivek/pathdiagrams documentation built on April 6, 2022, 9:13 p.m.