### 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)"
);
### Export results to a temporary directory
tmpDir <- tempdir(check = TRUE);
prettySources <-
export_to_html(input = parsedExamples,
output = tmpDir);
### Show first one
print(prettySources[[1]]);
Run the code above in your browser using DataLab