2073350af97372794fcd7557aae63eb236ca073c
RComplexity
The goal of RComplexity is to scan a directory or file for R functions provide a cyclic complexity score for each.
Installation
You can install the development version of RComplexity like so:
remotes::install_git("https://git.avsdev.uk/R/RComplexity")
Example
RComplexity::complexityDir("R", TRUE)
#> ...
#> # A tibble: 13 × 4
#> where what type complexity
#> <chr> <chr> <chr> <int>
#> 1 R/complexityFunction.R:141:26 getOutputComplexities FUNCTION 5
#> 2 R/complexityFunction.R:152:5 [[anon_fn]] FUNCTION 5
#> 3 R/complexityFunction.R:64:28 getFunctionComplexities FUNCTION 4
#> 4 R/complexityFunction.R:75:5 [[anon_fn]] FUNCTION 4
#> 5 R/complexityFunction.R:42:23 getExpressionLines FUNCTION 3
#> 6 R/complexityFunction.R:221:28 getObserverComplexities FUNCTION 3
#> 7 R/complexityFunction.R:234:5 [[anon_fn]] FUNCTION 3
#> 8 R/complexityDir.R:6:18 complexityDir FUNCTION 2
#> 9 R/complexityFunction.R:2:24 getFileComplexities FUNCTION 2
#> 10 R/complexityDir.R:11:32 [[anon_fn]] FUNCTION 1
#> 11 R/complexityFile.R:4:19 complexityFile FUNCTION 1
#> 12 R/complexityFunction.R:6:63 [[anon_fn]] FUNCTION 1
#> 13 R/complexityFunction.R:13:5 [[anon_fn]] FUNCTION 1
Description
Languages
R
100%