Determining the variables that are created in a script is useful for orienting code cleaning (i.e. refactoring) efforts.

get_vars(script)

Arguments

script

File path to a script or a Script object from CodeDepends.

Value

A list of variables from a given script.

Author

Matthew K. Lau

Examples

script <- system.file( "example", "simple_script.R", package = "Rclean") get_vars(script)
#> [1] "mat" "dat" "fit12" "fit13" "fit14" "fit15.aov" #> [7] "tab.12" "tab.13" "tab.14" "tab.15" "out"