IRdisplay icon indicating copy to clipboard operation
IRdisplay copied to clipboard

IRdisplay::html_display not showing any output

Open Abraham-newbie opened this issue 4 years ago • 1 comments

Hi, I am using IRdisplay in chrome on a jupyter notebook with conda, and it does not show any output or result in any error. The lm* are linear regression models combined by stargazer. Stargazer returns a proper html file without any errors.

m <- capture.output(stargazer(lm_enroll,lm_grades,lm_score,
         digits = 3,
          header = FALSE,
          type = "html", 
          se = rob_se,
          title = "Linear Panel Regression Model",
          model.numbers = FALSE)

IRdisplay::display_html(paste("<center>","",m,"","</center>"))

Abraham-newbie avatar May 09 '21 21:05 Abraham-newbie

Hi, please create a minimal reproducible example, i.e. the complete code necessary to reproduce. Just remove everything not strictly necessary to reproduce, and add everything that makes that run (library(stargazer), lm_enroll <- ..., …)

So m contains HTML code starting with <!doctype html> or so? In this case IRdisplay:::isolate_full_html(list(text/html' = m)) or so should return metadata with the isolate flag set, which should make it work for jupyter lab and so on: https://github.com/IRkernel/IRdisplay/blob/88b8e094d754523ac49ef9e50eefa169fc5ed236/R/utils.r#L19

flying-sheep avatar May 11 '21 08:05 flying-sheep