2
votes

I am not sure it is the proper place for such a question. Eventually, tell me and I will delete it.

Imagine a colleague with limited technological competences. No competences on R at all. Is there a way or a command that allows to create an R Markdown html (with the Knitr package) output which accepts comments in the similar way of a text editor?

enter image description here

The matter has no mention on the website of R markdown http://rmarkdown.rstudio.com/ nor on of the Knitr package http://yihui.name/knitr/.

1
I'm not sure about an html file with comments, but you can render your rmarkdown file into a MS word doc that can use comments. - ndimhypervol
One possible solution would be to interlace the comments directly onto the RMarkdown file and then color the commented text a certain color. It certainly wouldn't a side bar but it may be an interesting fix. - CinchBlue
Try something like diigo.com/tools/diigolet (not baked into Rmarkdown but prbly suitable for your needs) - hrbrmstr
@hrbrmstr, your suggestion is really interesting. I will report the result. It appears to be suitable for inexperienced users. - Worice

1 Answers

1
votes

Not sure such functionality exists, but I could think about how this could be emulated

  • Abusing links, and have browser configuraion which shows link on hovering, and maybe make such links in different color (linkcolor class?)

    [MM](another bad idea)

  • Abusing R code, you'll get code rectangle with just a text

    ```{r, echo=TRUE, eval=FALSE} MM: another bad idea ```

  • Abusing some R package which generates inlined HTML, say xtable

    ```{r results="asis", echo=FALSE} comments.df <- data.frame(c("WHO", "MM"), c("CMT", "Another bad idea")) print(xtable(comments.df), type = "html", include.rownames = FALSE)
    ```

Frankly, would be interested in the better answer, really good question...