Internal calculation of Lines-of-Code Statistics
Value
A list of statistics for each of three directories, 'R', 'src', and 'inst/include', each one having 5 statistics of total numbers of lines, numbers of empty lines, total numbers of white spaces, total numbers of characters, and indentation used in files in that directory.
See also
Other stats:
desc_stats()
,
pkgstats()
,
pkgstats_summary()
,
rd_stats()
Examples
f <- system.file ("extdata", "pkgstats_9.9.tar.gz", package = "pkgstats")
# have to extract tarball to call function on source code:
path <- extract_tarball (f)
loc_stats (path)
#> # A tibble: 3 × 12
#> # Groups: language, dir [3]
#> language dir nfiles nlines ncode ndoc nempty nspaces nchars nexpr ntabs
#> <chr> <chr> <int> <int> <int> <int> <int> <int> <int> <dbl> <int>
#> 1 C++ src 3 365 277 21 67 933 7002 1 0
#> 2 R R 19 3741 2698 536 507 27575 94022 1 0
#> 3 R tests 7 348 266 10 72 770 6161 1 0
#> # ℹ 1 more variable: indentation <int>