get_idd_relation: Get field relation data

View source: R/impl-idd.R

get_idd_relationR Documentation

Get field relation data

Description

Get field relation data

Usage

get_idd_relation(
  idd_env,
  class_id = NULL,
  field_id = NULL,
  direction = c("ref_to", "ref_by"),
  depth = 0L,
  name = FALSE,
  class = NULL,
  group = NULL,
  keep_all = FALSE,
  class_ref = c("both", "none", "all"),
  match_all = FALSE
)

Arguments

idd_env

An environment or list contains IDD tables including class, field, and reference.

class_id

An integer vector of valid class indexes. Should be NULL if field_id is given.

field_id

An integer vector of valid field id. Should be NULL if class_id is given.

direction

The relation direction to extract. Should be one of "ref_to" or "ref_by".

depth

If > 0, the relation is searched recursively. If NULL, all possible recursive relations are returned. Default: 0.

name

If TRUE, additional formatting columns are added and an IddRelation object is returned. Default: FALSE.

class, group

A character vector of group names used for searching relations. Default: NULL.

class_ref

Specify how to handle class-name-references. There are 3 options in total, i.e. "none", "both" and "all", with "both" being the default. * "none": just ignore class-name-references. * "both": only include class-name-references if this object also reference field values of the same one. This is the default option. * "all": include all class-name-references. This is the most aggressive option.

match_all

If TRUE, relation search will continue even though one relation has been found. If FALSE, searching is stopped whenever one relation is found in specified classes/groups. Default: FALSE.

Value

A data.table.


eplusr documentation built on Aug. 25, 2023, 5:18 p.m.