I'm brand new at R and I would like to make a neat table of my dataset using the packages kable and knitExtra in Rmarkdown. I'll try to explain the error through my code:
```{r, include=FALSE}
library(readxl); library(dplyr); library(kableExtra); library(knitr)
Froot <- read_excel("~/Documents/Project1/Fruit.xlsx")
knitr::kable(Froot[1:4])
kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
In the above code, when I try to knit it returns this error:
Quitting from lines 37-39 (Project1.Rmd)
Error in kable_styling(bootstrap_options = c("striped", "hover", "condensed")) : argument "kable_input" is missing, with no default
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> kable_styling
Execution halted
I notice the error is in the function "kable_styling", and so I attempted to solve the issue by just adding "kable_input", which turns the code into this:
```{r, include=FALSE}
library(readxl); library(dplyr); library(kableExtra); library(knitr)
Froot <- read_excel("~/Documents/Project1/Fruit.xlsx")
knitr::kable(Froot[1:4])
kable_styling(kable_input, bootstrap_options = c("striped", "hover", "condensed"))
But when I knit, it tells me that function "kable_input" could not be found!!
Quitting from lines 37-39 (Project1.Rmd)
Error in kable_input() : could not find function "kable_input"
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> kable_styling
Execution halted
Any fixes? I've tried googling it but I literally got no results.