createSubgraph: Create a Subgraph

View source: R/diagram_func.R

createSubgraphR Documentation

Create a Subgraph

Description

'createSubgraph()' is a function used to transform create subgraph based on DiagrammeR syntax and template. It is used to create one subgraph per group of records according to the Darwin Core scheme (i.e. Event Core, Occurrence and eMoF extensions). It models homogeneous relations (several levels in the same group of records). It returns a character string to insert into a template readable by grViz() function.

Usage

createSubgraph(
  df,
  dfNodeLabel,
  level,
  labelSubgraph,
  numCluster,
  style = solid
)

Arguments

dfNodeLabel

a dataframe that contains the labels of instances (which will be used for visual representation) and a code

labelSubgraph

a character string corresponding to the group of records represented in the subgraph (i.e. Event Core, Occurrence ext. or eMoF ext.)

numCluster

an integer corresponding to the subgraph number. The subgraphs must be numbered from 0 to N in ascending order to avoid errors when using grViz() function.

style

a character string indicating the style of subgraph box border (e.g. bold, solid, dashed)

dfRelations

a dataframe specific to one group of record (homogeneous), that contains at least one column "parent" and one column "children"

Value

a character string containing the subgraphs caracteristics, to insert into a template for grViz() function.

See Also

Other DiagrammeR function: createGraph()


fja062/WLDM.standardisation documentation built on Jan. 3, 2023, 11:23 a.m.