rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

Knitting documents containing View()

Open AmeliaMN opened this issue 7 years ago • 2 comments

As discussed in the RStudio Community, the View() function is great to launch a preview of your data in a spreadsheet-like format. But, it’s the only function I know of that works in the Console but totally borks your knitted document. Even ? and help() can be put in a chunk, and your document will still knit. The error message is hard to interpret, because new users probably don’t know what X11 is.

AmeliaMN avatar Feb 06 '18 10:02 AmeliaMN

I think we will have to hijack this function in the knitting process, e.g., replace it with

View = function(x, ...) x

yihui avatar Feb 07 '18 17:02 yihui

@yihui I can look at that. Do you have any pointer on where to add this highjacking ? Would it be in knitr ?

cderv avatar Oct 23 '20 13:10 cderv