These functions allows access to the environments contained within fseq objects. fseq objects are functions that have been created using the pipeline with a . as the left-hand side.

fseq functions contain a major environment for the overall function (i.e the environment of fn_fseq) and multiple minor environments. The minor environments are the function-environments of each of functions that make up the functional sequence.

For example, if we define a <- . %>% add(2) %>% multiply_by(3), then a() will be a function that has an environment, this is the major environment. Within a(), there is a list of functions that make up the function sequence, add(.,2) and multiply_by(.,3). Each of these will also have their own environment, the minor environments. Therefore, a() will have 3 environments associated with it.

fseq_get_env(fn_fseq, i)

fseq_print_env(fn_fseq, i)

fseq_set_env(fn_fseq, i, new_env)

fseq_check_env(new_env)

fseq_copy_fun(fn_fseq)

fun_var_env(fun, variable, value)

Arguments

fn_fseq

a function of class fseq (with an appropriate environment).

i

a numeric indicating which function in the fseq to refer to. If 0, then the parent fseq environment will be used.

new_env

environment to be assigned to the relevant environment in fn_fseq.

fun

function to edit the environment of.

variable

name of variable (as string) to assign value to within all environments in fun.

value

value to be assigned to variable in all environments in fun