Notebook renders differently from document

rmarkdown
knitr

#1

Why does the same markdown code render quite differently as html_document (OK) and html_notebook (not OK):

output: html_document
RStudio blocked image insert: CRAZY: New users only allowed one image in a post? Why?

output: html_notebook
NotOK

dSample is a SQL Server table reference:

dSample <- tbl(xxx, in_schema("yyy", "zzz"))

#2

Is this possibly the same as this issue?

Can you post an image of the html_document output in a separate message? (edited to add: I mean in this thread, not in a new thread, in case that wasn't clear)

(as in so many things on the internet, the reason for limits on new users who are necessarily of as-yet-unknown trustworthiness is that these limits make the site less attractive to abuse by spambots, sock puppets, and trolls :slightly_frowning_face:)


#3

Thanks jcblum for your quick response. It is possible my problem is the same issue.

I tried to post a .nb.html file with the problem (and planned to post the corresponding .html), but restrictions again: "Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, pdf)."

I was able to create a simple example that shows the same problem. (I used dput on the original object that was not displaying correctly).

y <- structure(list(n = 768L), row.names = c(NA, -1L), class = c("tbl_df", 
"tbl", "data.frame"))
y

y does not display correctly in a notebook, but looks fine in a document.

It's possible this problem is related to the new R 3.5.0.

I'm not seeing the same problem with R 3.4.4 on a different machine. (When I tried to reconfigure RStudio to use R 3.4.4, which is still present, I get an error that appears to be connected to the Rcpp.dll.)


#4

Just to clarify, how does y display in an nb.html viewed in a web browser?

If it is the same bug, it looks like there may have been some progress in recent dailies, if you're up for trying that. See here:


#5

The output for y appears exactly like the output I originally posted -- the line that starts "[38;5;246m# A tibble ..." Chrome and RStudio display the same thing.

Thanks the info about the daily builds. I need a stable fix. I may downgrade to R 3.4.4.

I'll be more cautious about upgrades next time.


#6

Sadly, sometimes downgrading is the shortest path back to getting work done... Good luck!


#7

For what it's worth, we do plan on producing a patch release of the v1.1 branch with a fix for the issue you've encountered, and that should hopefully be published soon (hopefully by the end of this week). Sorry for the trouble!


#8

I installed RStudio 1.1.453 released 2018-05-16 and I don't see the problem. Thanks!