--- title: "modelStudio in R Markdown HTML" author: "Hubert Baniecki" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{modelStudio in R Markdown HTML} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` To properly generate `modelStudio` in R Markdown HTML, add additional CSS into the `.Rmd` file. One can either make the space wider, e.g.: ``` ``` Or/and move the dashboard to the left, e.g.: ``` ``` Then, proceed to generate the `modelStudio`: ```{r warning = FALSE, message = FALSE} library("DALEX") library("ranger") library("modelStudio") # fit a model model <- ranger(score ~., data = happiness_train) # create an explainer for the model explainer <- explain(model, data = happiness_test, y = happiness_test$score, label = "Random Forest", verbose = FALSE) # make a studio for the model modelStudio(explainer) ```