After multiple test and try I got a pdf from my script using knitr. Almost everything its right but I have some problems with default output: Date and sessionInfo. Also kableExtra library got me error.
I am not using R-studio...
Example of my script:
library(xtable)
library(knitr)
library(kableExtra)
#My first pdf with knitr
data(mtcars)
tabla=mtcars%>%
count(am)
kable(tabla, caption="tabla uno")
My commands to compile my script and get a pdf:
library(knitr)
setwd("C:/Users/Desktop")
knitr::stitch("C:/Users/Desktop/script.R")
In my pdf result below, you can see that pdf document begin with the date and finish with sessionInfo. I would like edit the date and put my own header and text and would like delete sessionInfo too. Also you can see that kable table is at the end of document and not in the correct order. Also I did try to add echo=FALSE, to avoid show command to make table but without success...: