### Get path to example source
examplePath <-
system.file("extdata", package="rock");
### Parse a selection of example sources in that directory
parsedExamples <-
rock::parse_sources(
examplePath,
regex = "(test|example)(.txt|.rock)"
);
### Create cooccurrence matrix
rock::create_cooccurrence_matrix(parsedExamples);
Run the code above in your browser using DataLab