This will go up 0, 1, 2, 3, 4, and 5, directories looking for the file top_file. It returns the least high up directory as a relative path (like "../../"). This is useful for finding where the .Rproj file is so you can define paths relative to that when inserting child documents into knitr docs, etc. Throws an error if it doesn't find a directory with top_file in it.
1 | prj_dir_containing(top_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.