options(knitr.duplicate.label = "allow") knitr::opts_chunk$set(echo = TRUE, include= TRUE, message = TRUE)
grand <- "grand" grandNparent <- "grand" grandNchild <- "grand" all <- "grand"
varNames <- c("child", "parent", "grand", "grandNchild", "grandNparent", "parentNchild", "all" ) vars <- sapply( varNames, function( var ) { ifelse( exists( var), get(var), "") }) data.frame( Variable= vars, WantBeforeGrand= c("", "", "grand", "grand", "grand", "", "grand" ) )
ComplexRmd::includeChild( "returnParent.Rmd", import= varNames )
varNames <- c("child", "parent", "grand", "grandNchild", "grandNparent", "parentNchild", "all" ) vars <- sapply( varNames, function( var ) { ifelse( exists( var), get(var), "") }) data.frame( Variable= vars, WantAfterGrand= c("child", "parent", "grand", "child", "parent", "child", "child" ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.