Everything works fine but kable only wants to take the first line (in kabel argument) and not go through everything like i do in the beginning.
library('kableExtra')
library('knitr')
employee <- c('John Doe','Peter Gynn','Jolie Hope','John Doe','Peter Gynn','Jolie Hope')
salary <- c(21000, 23400, 26800,1000, 23400, 26800)
startdate <- (c('2010-11-1','2008-3-25','2007-3-14','2010-11-1','2008-3-25','2007-3-14'))
df <- data.frame(employee, salary, startdate)
input <- df
template <- "\n\n\n\\n\n\\n\n\ text text text text text %s text \n\n\ text texttext text text
text text text text\n\n\ text %s texttext text texttext text texttext text text\n\n\
%s
\n\n\
\n\n\n\
\n\n\n\
" # dont't forget the newline
for (i in seq(nrow(input))) {
current <- input[i, ]
cat(sprintf(template, df$'employee', df$'salary', knitr::kable(head(df, n = 1))))
break
}