options(knitr.duplicate.label = "allow") knitr::opts_chunk$set(echo = TRUE, include= TRUE, message = TRUE)
Before calling child:
paramNames <- c("child", "parent", "grand", "grandNchild", "grandNparent", "parentNchild", "all" ) opts <- sapply( paramNames, function( opt ) { ifelse(is.null(params[[ opt ]]), "", params[[ opt ]]) }) data.frame( Param= opts, WantDirect= c("", "parent", "", "", "parent", "parent", "parent" ), WantFromGrand= c("", "parent", "grand", "grand", "grand", "parent", "grand" ) )
Calling child:
ComplexRmd::includeChild( "paramChild.Rmd" )
After calling child, back to parent starting parameters:
paramNames <- c("child", "parent", "grand", "grandNchild", "grandNparent", "parentNchild", "all" ) opts <- sapply( paramNames, function( opt ) { ifelse(is.null(params[[ opt ]]), "", params[[ opt ]]) }) data.frame( Param= opts, WantDirect= c("", "parent", "", "", "parent", "parent", "parent" ), WantFromGrand= c("", "parent", "grand", "grand", "grand", "parent", "grand" ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.