rmonad_getters: Vectorized getters for public Rmonad fields

Description Usage Arguments Examples

Description

Vectorized getters for public Rmonad fields

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
get_parents(m, index = .get_ids(m), tag = NULL)

get_dependents(m, index = .get_ids(m), tag = NULL)

get_nest(m, index = .get_ids(m), tag = NULL)

get_prior(m, index = .get_ids(m), tag = NULL)

get_depth(m, index = .get_ids(m), tag = NULL)

get_nest_depth(m, index = .get_ids(m), tag = NULL)

get_value(m, index = .get_ids(m), tag = NULL, warn = TRUE)

get_key(m, index = .get_ids(m), tag = NULL)

get_id(m, index = .get_ids(m), tag = NULL)

get_OK(m, index = .get_ids(m), tag = NULL)

get_code(m, index = .get_ids(m), tag = NULL)

get_tag(m, index = .get_ids(m), tag = NULL)

get_error(m, index = .get_ids(m), tag = NULL)

get_warnings(m, index = .get_ids(m), tag = NULL)

get_notes(m, index = .get_ids(m), tag = NULL)

get_doc(m, index = .get_ids(m), tag = NULL)

get_meta(m, index = .get_ids(m), tag = NULL)

get_time(m, index = .get_ids(m), tag = NULL)

get_mem(m, index = .get_ids(m), tag = NULL)

get_summary(m, index = .get_ids(m), tag = NULL)

Arguments

m

An Rmonad object

index

Selection of indices to extract (all by default). The indices may be a vector of integers, node names, or igraph vertices (igraph.vs).

tag

character vector specifying the tags that must be associated with extracted nodes

warn

logical In get_value, raise a warning on an attempt to access an uncached node

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
data(gff)
m <- gff$good_result

# vectorized accessors for all stored slots
get_value(m, warn=FALSE)
get_OK(m)
get_code(m)
get_dependents(m)
get_doc(m)
get_error(m)
get_id(m)
get_mem(m)
get_meta(m)
get_nest(m)
get_nest_depth(m)
get_notes(m)
get_parents(m)
get_prior(m)
get_summary(m)
get_time(m)
get_warnings(m)

# get the code associated with long running functions
get_code(m)[get_time(m) > 0.1]

# Calculate the average node degree
nparents <- sapply(get_parents(m), length)
nchildren <- sapply(get_dependents(m), length)
sum(nparents + nchildren) / size(m) 

rmonad documentation built on March 26, 2020, 7:31 p.m.