documents {rscc} | R Documentation |
Creates word vectors from parsed sourec code objects. If
type=="vars"
then the names of all.vars(.)
,
type=="funs"
then the namas of setdiff(all.names(.), all.vars(.)
, and
type=="names"
then the names of all.names(.)
are used.
documents(
prgs,
type = c("vars", "funs", "names"),
ignore.case = TRUE,
minlen = 2,
...
)
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 |
a
# 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