Based on the input of a Rmarkdown source file containing exercise problems and solutions, a Rmarkdown notebook is created that contains only the exercise problems.
convert_ex_to_nb( ps_ex_path, ps_nb_out_dir, ps_nb_deploy_dir, pvec_subdir_nb = c("odg"), pn_comment_line_offset = 3, pb_force = FALSE, pb_debug = FALSE, pobj_rtt_logger = NULL )
ps_ex_path | path to the Rmarkdown source file |
---|---|
ps_nb_out_dir | output directory for Rmd notebook |
ps_nb_deploy_dir | deployment directory of rendered nb |
pn_comment_line_offset | number of lines taken by R-code junk to produce md-comment |
pb_force | force output even if output file already exists |
pb_debug | debugging flag |
pobj_rtt_logger | log4r logger object |
This function assumes that the solutions are marked with surrounding R-code junks with the tags comment-start and comment-end.
if (FALSE) { convert_ex_to_nb(ps_ex_path = 'ex/asm_ex02.Rmd', ps_nb_out_dir = 'nb', ps_nb_deploy_dir = 'docs/nb') }