documents: documents

Description Usage Arguments Value Examples

View source: R/documents.R

Description

Creates word vectors from parsed sourec code objects. If

are used.

Usage

1
2
3
4
5
6
7
documents(
  prgs,
  type = c("vars", "funs", "names"),
  ignore.case = TRUE,
  minlen = 2,
  ...
)

Arguments

prgs

prgs sourcecode object

type

character: either "vars", "funs", "names" (default: "vars")

ignore.case

logical: If TRUE, case is ignored for computing (default: TRUE)

minlen

integer: minimal name length to be considered (default: 2)

...

unused

Value

a

Examples

1
2
3
4
5
# example files are taken from https://CRAN.R-project.org/package=SimilaR
files <- list.files(system.file("examples", package="rscc"), "*.R$", full.names=TRUE)
prgs  <- sourcecode(files, basename=TRUE)
docs  <- documents(prgs)
docs

rscc documentation built on Jan. 20, 2022, 5:08 p.m.