Hi @ksingh19,
Does this do what you require? The purl()
function extracts the R code from the .Rmd
file, then that can then be sourced.
library(knitr)
source(knitr::purl("file_one.Rmd"))
source(knitr::purl("file_two.Rmd"))
See:
https://bookdown.org/yihui/rmarkdown-cookbook/purl.html