dupree_dir: Run duplicate-code detection over all R-files in a directory

Description Usage Arguments See Also

View source: R/dupree.R

Description

Run duplicate-code detection over all R-files in a directory

Usage

1
2
3
4
5
6
7
dupree_dir(
  path = ".",
  min_block_size = 40,
  filter = NULL,
  ...,
  recursive = TRUE
)

Arguments

path

A directory (By default the current working directory). All files in this directory that have a ".R", ".r" or ".Rmd" extension will be checked for code duplication.

min_block_size

dupree uses a notion of non-trivial symbols. These are the symbols / code-words that remain after filtering out really common symbols like <-, ,, etc. After filtering out these symbols from each code-block, only those blocks containing at least min_block_size symbols are used in the inter-block code-duplication measurement.

filter

A pattern for use in grep - this is used to keep only particular files: eg, filter = "classes" would compare files with 'classes' in the filename

...

Further arguments for grep. For example, 'filter = "test", invert = TRUE' would disregard all files with 'test' in the file-path.

recursive

Should we consider files in subdirectories as well?

See Also

dupree


dupree documentation built on April 21, 2020, 5:06 p.m.