documents {rscc}R Documentation

documents

Description

Creates word vectors from parsed sourec code objects. If

are used.

Usage

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

# 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

[Package rscc version 0.2.1 Index]