Skip to contents

A manipulator for the edbl_design.

A manipulator for the edbl_design.

Details

Internal functions should create a new Kitchen object. The Kitchen contains a set of operations to manipulate the nodes and edges of the edibble design object.

Public fields

design

An edibble design object Initialise function

Active bindings

fct_nodes

Get the factor nodes

lvl_nodes

Get the level nodes

fct_edges

Get the factor edges

lvl_edges

Get the level edges

fct_n

Get the number of nodes in factor graph

lvl_n

Get the number of nodes in level graph

fct_last_id

Get the last factor id.

lvl_last_id

Get the last level id.

fct_leaves

Get the leave factor ids.

rcrd_ids

Get the ids for all edbl_rcrd factors.

unit_ids

Get the ids for all edbl_unit factors.

trt_ids

Get the ids for all edbl_trt factors.

trt_names

Get the node labels for treatments

unit_names

Get the node labels for units

rcrd_names

Get the node labels for record

is_connected

Check if nodes are connected.

Methods


Method new()

Usage

Kitchen$new(design = NULL)

Arguments

design

An edibble design.


Method fct_id()

Get the id based on either the name of the factor node or the class.

Usage

Kitchen$fct_id(name = NULL, class = NULL)

Arguments

name

The name of the vertex.

class

The class for the vertex/node.


Method lvl_id()

Get the id based on name of level node

Usage

Kitchen$lvl_id(name = NULL, class = NULL)

Arguments

name

The name of the vertex.

class

The class for the vertex/node.


Method fct_names()

Get the factor names based on id or class

Usage

Kitchen$fct_names(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method lvl_names()

Get the level names based on id or class

Usage

Kitchen$lvl_names(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method append_fct_nodes()

Given node data, append the factor nodes

Usage

Kitchen$append_fct_nodes(data)

Arguments

data

The nodes data


Method append_lvl_nodes()

Given node data, append the level nodes

Usage

Kitchen$append_lvl_nodes(data)

Arguments

data

The nodes data


Method append_fct_edges()

Given edge data, append the factor edges

Usage

Kitchen$append_fct_edges(data)

Arguments

data

The nodes data


Method append_lvl_edges()

Given edge data, append the level edges

Usage

Kitchen$append_lvl_edges(data)

Arguments

data

The nodes data


Method fct_class()

Get the class of the vertex given the factor id

Usage

Kitchen$fct_class(id = NULL)

Arguments

id

The id of the corresponding node.


Method lvl_class()

Get the class of the vertex given the level id

Usage

Kitchen$lvl_class(id = NULL)

Arguments

id

The id of the corresponding node.


Method fct_child()

Get the factor child ids. If class is supplied then the child has to fit class

Usage

Kitchen$fct_child(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method lvl_child()

Get the level child ids

Usage

Kitchen$lvl_child(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method fct_parent()

Get the factor parent ids

Usage

Kitchen$fct_parent(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method lvl_parent()

Get the level parent ids

Usage

Kitchen$lvl_parent(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method fct_ancestor()

Get the factor ancestor ids

Usage

Kitchen$fct_ancestor(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method lvl_ancestor()

Get the level ancestor ids

Usage

Kitchen$lvl_ancestor(id = NULL, class = NULL)

Arguments

id

The id of the corresponding node.

class

The class for the vertex/node.


Method fct_levels()

Get the levels for each factor

Usage

Kitchen$fct_levels(id = NULL, name = NULL)

Arguments

id

The id of the corresponding node.

name

The name of the vertex.


Method setup_data()

Setup the node and edge data

Usage

Kitchen$setup_data(fresh, name, class)

Arguments

fresh

The value of the new graph structure to add.

name

The name of the vertex.

class

The class for the vertex/node.


Method add_anatomy()

Add the anatomy structure

Usage

Kitchen$add_anatomy(fresh, name, class)

Arguments

fresh

The value of the new graph structure to add.

name

The name of the vertex.

class

The class for the vertex/node.


Method fct_exists()

One of name, id or class is defined to check if it exists. If more than one of the arguments name, id and class are supplied, then the intersection of it will be checked.

Usage

Kitchen$fct_exists(name = NULL, id = NULL, class = NULL, abort = TRUE)

Arguments

name

The name of the vertex.

id

The id of the corresponding node.

class

The class for the vertex/node.

abort

A logical value to indicate whether to abort if it doesn't exist.


Method trts_exists()

Check if treatment exists.

Usage

Kitchen$trts_exists(abort = TRUE)

Arguments

abort

Whether to abort.


Method units_exists()

Check if unit exists.

Usage

Kitchen$units_exists(abort = TRUE)

Arguments

abort

Whether to abort.


Method rcrds_exists()

Check if record exists.

Usage

Kitchen$rcrds_exists(abort = TRUE)

Arguments

abort

Whether to abort.


Method clone()

The objects of this class are cloneable with this method.

Usage

Kitchen$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.