Html code in console instead of nice table in Viewer

Hi,

I have a df like this:

and the code:

library(gtsummary)
library(knitr)
library(kableExtra)

table_html <- data4 %>%
  tbl_summary() %>%
  as_kable()

Instead of getting nice table in Viewer pane I got html code in console:

<table>
 <thead>
  <tr>
   <th style="text-align:left;"> **Characteristic** </th>
   <th style="text-align:center;"> **N = 5,381** </th>
  </tr>
 </thead>
<tbody>
  <tr>
   <td style="text-align:left;"> Likert </td>
   <td style="text-align:center;">  </td>
  </tr>
  <tr>

How to rectify this ?

2 things that come in mind:

  1. chunks are displaying with "asis" setting.

  2. preview in viewer is not checked correctly in cartwheel.

When you knit the document is the output okay?
Can you provide more detailed example as to the chunk and document settings?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.