# NOT RUN {
### Get path to example source
examplePath <-
system.file("extdata", package="rock");
### Get a path to one example file
exampleFile <-
file.path(examplePath, "example-1.rock");
### Parse single example source
parsedExample <- rock::parse_source(exampleFile);
### Show organised coded fragments in Markdown
cat(collect_coded_fragments(parsedExample));
### Only for the codes containing 'Code2'
cat(collect_coded_fragments(parsedExample,
'Code2'));
# }
Run the code above in your browser using DataLab