proc: Get creators and users of data

get.creatorR Documentation

Get creators and users of data

Description

get.creator finds the node that creates the given data node

A data node can represent a variable or a file. The users of the data node will be procedure nodes representing the statment that used the variable in an expression or read from the file.

Usage

get.creator(adj.graph, data.node.id)

get.users(adj.graph, data.node.id)

Arguments

adj.graph

the adjacency matrix

data.node.id

the id of the data node.

Details

A data node can represent a variable, a file, a plot, or a warning or error. The creator of the data node will be a procedure node representing the statment that assigned the variable, wrote to the file, created the plot, or resulted in the error or warning.

Value

the id of the procedure node that created the specified data node. Returns NULL if there is no node with the given id, the id is not for a data node, or the data node does not have a creator. The last case can occur, for example, if the data node represents an input file.

the id of the procedure node that created the specified data node. Returns NULL if there is no node with the given id, the id is not for a data node, or the data node does not have any users. The last case can occur, for example, if the data node represents an output file.

See Also

create.graph

create.graph

Examples

adj.graph <- create.graph(system.file("testdata", "basic.json", package = "provGraphR"))
get.creator (adj.graph, "d1")

get.users (adj.graph, "d1")


provGraphR documentation built on Aug. 17, 2022, 5:06 p.m.