documents {rscc} | R Documentation |
documents
Description
Creates word vectors from parsed sourec code objects. If
-
type=="vars"
then the names ofall.vars(.)
, -
type=="funs"
then the namas ofsetdiff(all.names(.), all.vars(.)
, and -
type=="names"
then the names ofall.names(.)
are used.
Usage
documents(
prgs,
type = c("vars", "funs", "names"),
ignore.case = TRUE,
minlen = 2,
...
)
Arguments
prgs |
prgs sourcecode object |
type |
character: either |
ignore.case |
logical: If TRUE, case is ignored for computing (default: |
minlen |
integer: minimal name length to be considered (default: |
... |
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]