Do you advise r/css/md in separate files, and then use codes in the R file such as the one below to create an html file base on the md and css file and then from the html file convert to pdf file Or is it better to have all of it (r, md, css) in one file such as an Rmd file then just knit it to either html or pdf ?
markdownToHTML ("a.md", "a.html", stylesheet = "a.css")
I like the first choice since is very organized, but how do I incorporate the data in the md file unless it is static but what if I preferred to read an file or data from an external source then how to make the md file adapt to that or how do I use R code in the first scenario to manipulate the data in the md file ? Could you kindly please post an example code for the first scenario.
Maybe the second choice is better and more ideal, I don't know, please advise ?