Files
RComplexity/README.md

42 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- README.md is generated from README.Rmd. Please edit that file -->
# RComplexity
<!-- badges: start -->
<!-- badges: end -->
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:
``` r
remotes::install_git("https://git.avsdev.uk/R/RComplexity")
```
## Example
``` r
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
```