Learn R Programming

rtables (version 0.6.17)

get_full_lyt_df: Retrieve Info About Possible Nesting Anchors

Description

This function scans an existing layout's row structure and lists valid at_sibling anchors for intermediate nesting.

Usage

get_full_lyt_df(
  splvec,
  next_node = 1L,
  next_anchor_step = 1L,
  parent,
  depth,
  node_type
)

# S4 method for PreDataTableLayouts get_full_lyt_df( splvec, next_node = 1L, next_anchor_step = 1, parent, depth, node_type )

get_layout_dfs(lyt)

# S4 method for PreDataRowLayout get_full_lyt_df( splvec, next_node = 1, next_anchor_step = 1L, parent = 0L, depth = 1L, node_type = "active" )

# S4 method for PreDataColLayout get_full_lyt_df( splvec, next_node = 1, next_anchor_step = 1L, parent = 0L, depth = 1L, node_type = "active" )

# S4 method for SplitVector get_full_lyt_df( splvec, next_node = 1L, next_anchor_step = 1L, parent, depth, node_type )

# S4 method for SplitVectorTree get_full_lyt_df( splvec, next_node = 1L, next_anchor_step = 1L, parent, depth, node_type )

# S4 method for Split get_full_lyt_df( splvec, next_node = 1L, next_anchor_step = 1L, parent, depth, node_type )

# S4 method for VTableNodeInfo get_full_lyt_df( splvec, next_node = 1L, next_anchor_step = 1L, parent, depth, node_type )

get_anchor_dfs(lyt)

get_row_anchor_df(lyt)

get_row_anchor_list(lyt)

Value

for get_layout_dfs a list with rows and cols elements containing layout data.frames (see Details) for each structural dimension; get_anchor_dfs returns the same, but with anchor data.frames rather than full layout ones. get_anchor_row_df

is a convenience function that returns only the rows anchor data.frame. get_row_anchor_list returns a list, each element of which is a set of the names of one or more layout instructions that will be placed as direct siblings to each-other; i.e., anchored to the first element of the vector when the length of the element is greater than one.

Arguments

splvec

(PreDataTableLayouts or internal classes)
The layout or partial layout to list anchors for.

next_node

(integer(1))
For internal use

next_anchor_step

(integer(1))
For internal use.

parent

(integer(1))
For internal use.

depth

(integer(1))
For internal use.

node_type

(character(1))
For internal use.

lyt

(PreDataTableLayouts or PreDataRowLayout)
A layout or row to identify anchors for.

Details

A layout data.frame is a data.frame describing a single dimension of pre-data layout structure, containing the following columns (most of which are used for internal implementations and will not be useful to the end-user):

  • name: name of the element

  • nodeid: sequential numeric id of the node, for use in constructing graphs (0 is the root node)

  • parentid: node id of the layout instructions direct parent

  • depth: length of path from root to the current node through the implicit graph defined by the (nodeid, parentid) pairings

  • type: a description of the 'type' of the node, used internally

  • is_toplevel: whether the node represents a top-level split/analysis.

  • anchor_step: position along the path of eligible anchor points, (NA for nodes not along that path).

The core difference between a layout data.frame and an anchor data.frame is that the anchor df has been subset to remove rows for nodes not currently eligible to be anchor points (ie allowed targets for a subsequent instruction's at_sibling argument).

Examples

Run this code

lyt <- basic_table() |>
  split_cols_by("ARM") |>
  split_rows_by("STRATA1") |>
  split_rows_by("RACE") |>
  split_rows_by("SEX") |>
  analyze("AGE") |>
  split_rows_by("BMRKR1", at_sibling = "RACE") |>
  analyze("AGE")

get_layout_dfs(lyt)
get_anchor_dfs(lyt)
get_row_anchor_df(lyt)

Run the code above in your browser using DataLab