M. P. R.
M. P. R.

Reputation: 103

Data frame printing in R Markdown : how to hide column type?

When I print a data frame with R Markdown (html_document), I get the following table (see image below) with the following example code :


title: "Motor Trend Car Road Tests"
output:
  html_document:
    df_print: paged
---

```{r}
mtcars
```

Printed Data Frame

Is there a way to hide the column types corresponding to the yellow highligting in the image?

Upvotes: 3

Views: 4573

Answers (1)

Daniel Anderson
Daniel Anderson

Reputation: 2424

One option - Use the DT package.

---
title: "Motor Trend Car Road Tests"
output:
  html_document:
    df_print: paged
--- 

```{r}
DT::datatable(mtcars)
```

enter image description here

Upvotes: 7

Related Questions