HTML coming from R markdown also has problems.
But, I can use HTML or MD and get nice-looking HTML pages if I just put the pages into my home directory at Duke... read on...
R markdown
- In R Studio, choose File --> New --> R Markdown.
- Paste R code as appropriate and click Knit HTML.
- It should ask you where you want to save. Choose a convenient directory, like a subfolder of the main directory of .public_html from my stat machine.
- Once knitted, the code editable in R studio has .Rhtml extension and the webpage itself has .html extension. So if I saved it as filename "test" in the main directory of .public_html/, then to access it on the web just go to stat.duke.edu/~gjl7/[more]/test.html. What's [more]? That just refers to further subdirectory placement inside .public_html/.
- R HTML (instead of R Markdown) works basically the same way but I think MD is nicer.
- Here's a link, and the file ready for R below.
example_of_rmd.rmd |
HTML
- see MD comments...
- Here's a link, and the file ready for R below.
example_of_rhtml.rhtml |