FunctionData: FunctionData

Description Public fields Active bindings Methods

Description

R6 class wrapper for data returned by functiondepends functions

Public fields

path

Character path of repository

envir

Environment to store parsed functions in

functions

Data.frame with functions found in path

dependencies

Data.frame serving as edge list of function dependencies

graph,

Igraph object

Active bindings

graph,

Igraph object

Methods

Public methods


Method new()

Initialize path and create new environment

Usage
FunctionData$new()
Arguments
path

Character path to search source R files in


Method is_initialized()

Check if fields are initialized

Usage
FunctionData$is_initialized()

Method reset()

Reset fields to NULL

Usage
FunctionData$reset()

Method create_path()

Create path to downloaded data

Usage
FunctionData$create_path(repo, branch)
Arguments
repo

Character, name of repository in format Name/Repo

branch

Character, name of branch

Returns

Character, path


Method download_github()

Download repository from GitHub

Usage
FunctionData$download_github(repo, branch)
Arguments
repo

Character, name of repository in format Name/Repo

branch

Character, name of branch

Returns

Logical, indicates whether download succeeded


Method set_path()

Set path field

Usage
FunctionData$set_path(path)
Arguments
path

Character path to search source R files in


Method get_path()

Getter for path field

Usage
FunctionData$get_path()

Method set_envir()

Set envir field

Usage
FunctionData$set_envir(envir = new.env())
Arguments
envir

Environment, default is new.env()


Method get_envir()

Getter for envir field

Usage
FunctionData$get_envir()

Method find_functions()

Search for functions in path

Usage
FunctionData$find_functions()

Method get_functions()

Getter for functions field

Usage
FunctionData$get_functions()

Method find_dependencies()

Find dependencies of found functions

Usage
FunctionData$find_dependencies(in_envir = TRUE)
Arguments
in_envir

Logical, to be passed to functiondepends::find_dependencies


Method get_dependencies()

Getter for dependencies field

Usage
FunctionData$get_dependencies()

Method make_graph()

Make graph

Usage
FunctionData$make_graph()

Method get_graph()

Get graph

Usage
FunctionData$get_graph(node = NULL, mode = NULL, order = NULL)
Arguments
node

Character, name of node to select

mode

Character, mode of neighborhood

order

Integer, order of neighborhood


Method plot()

Plot network

Usage
FunctionData$plot(node = NULL, mode = NULL, order = NULL)
Arguments
node

Character, name of node to select

mode

Character, mode of neighborhood

order

Integer, order of neighborhood


Method plot_distribution()

Plot network

Usage
FunctionData$plot_distribution(node = NULL, mode = "all", order = NULL)
Arguments
node

Character, name of node to select

mode

Character, mode of neighborhood

order

Integer, order of neighborhood


Method clone()

The objects of this class are cloneable with this method.

Usage
FunctionData$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


jakubsob/functionExplorer documentation built on Jan. 1, 2021, 4:26 a.m.