pdf - Using rmarkdown to create headers from a large .txt input -
i'm trying create pdf headers rmarkdown. i'm reading in large text file, , want print out pdf using headers. can read in , print pdf desired formatting, minus headers, using
```{r comment='', echo=false} cat(readlines("blah.txt", encoding="utf-8"), sep="/n") ```
however, can't rmarkdown evaluate '#' in text, creates headers. i've inserted '#' different sections of .txt file want create header, doesn't evaluate hashtag.
does know how rmarkdown evaluate '#' header without messing formatting of text file have it?
thanks!
welcome so!
rmarkdown recognizes # ...
-headers if there space line before. need add line-break:
```{r comment='', echo=false, results='asis'} cat(readlines("blah.txt", encoding="utf-8"), sep="\n\n") ```
note: maybe want add results='asis'
in r-junk in order accomplish breaked lines.
Comments
Post a Comment