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: 4 × 12
#> # Groups: language, dir [4]
#> 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 2 146 121 1 24 395 2423 1 0
#> 4 R tests/te… 5 202 145 9 48 375 3738 1 0
#> # ℹ 1 more variable: indentation <int>