function_to_function: Runs from start of fun1 and sets up args for fun2 when it...

View source: R/debugging.R

function_to_functionR Documentation

Runs from start of fun1 and sets up args for fun2 when it gets to it.

Description

Runs function_1 from the beginning of fun_name_1 to the start of fun_name_2 and then runs function_var_to_env on that second function

Usage

function_to_function(fun_name_1, fun_name_2, to_env = globalenv())

Arguments

fun_name_1

Name of the outmost function as a string.

fun_name_2

Name of the inner function as a string.

to_env

Environment in which the arguments should be called.

Value

No return value.

Side effects

  • runs the first line of function_1 up to the first useage of function_2 in to_env

  • runs function_var_to_env on function 2 in to_env

Limitations

  • Can't use the name to fun_name_2 in comments or anything prior to it's usage

  • Can only go into the first usage of fun_name_2

  • Won't work if fun_name_2 is inside of any other data structure, even if/then statements.

See also

  • function_var_to_env


Benjamin-Vincent-Lab/housekeeping documentation built on Feb. 17, 2024, 2:13 a.m.