Summarise functions used in R package

summariseFunctionUse(r_files, verbose = FALSE)

Arguments

r_files

Complete path(s) to files to be investigated

verbose

Default: FALSE; prints message to console which file is currently being worked on.

Value

tibble

Examples

summariseFunctionUse(
  r_files = system.file(package = "DependencyReviewer", "testScript.R"))
#> # A tibble: 39 × 4
#>    r_file        line pkg     fun       
#>    <chr>        <int> <chr>   <chr>     
#>  1 testScript.R    28 base    function  
#>  2 testScript.R    29 base    list.files
#>  3 testScript.R    30 base    tempdir   
#>  4 testScript.R    34 base    length    
#>  5 testScript.R    35 base    message   
#>  6 testScript.R    36 dplyr   tibble    
#>  7 testScript.R    36 unknown read.csv  
#>  8 testScript.R    36 base    return    
#>  9 testScript.R    39 base    tempfile  
#> 10 testScript.R    41 base    tempdir   
#> # … with 29 more rows

# Only in an interactive session
if (interactive()) {
  summariseFunctionUse(list.files(here::here("R"), full.names = TRUE))
}