My dataset is missing most of the columns when I try to knit. The html page shows only 2 columns, but my dataset has 11. The output shown in Rstudio after running the chunk is fine, the dataset is shown properly without any missing data:
Dataset shown in Rstudio (without issues):
Dataset shown on html page (misssing columns):
---
title: "Video Games Salse Analysis"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
---
```{r}
# checking column and data overview
games_data <- import("vgsales.csv")
games_data
```
I tried to increase the data-width and change the vertical_layout but they did not help.
CodePudding user response:
It seems to be an issue with the size of the dataset. If you use the kable()
function from the knitr
library it prints all the columns but it takes awhile to render. Replace your last line (games_data) with the following.
knitr::kable(games_data)
Be sure to install the knitr package if you haven't already.install.packages('knitr')