Thanks, Yihui.
I am using RStudio on a server, and though the newer version of R is installed and I could run R using the newer version, I am not sure how I could configure RStudio to use the newer version. It seems that it may need to be system-wide configuration by the admins.
As far as add-on packages, no one is loaded for this exercise.
I also did a little more testing. In a code chunk that only load the packages (packagesToLoad <- c("caret","data.table","dplyr","ggmap","ggplot2","reshape2","sqldf")), kint HTML failed with the same error (no error if just running the code without calling knit HTML), and it would run knit HTML through after removing "sqldf". In fact, it generated the same error when loading only "sqldf" even when I used just re-installed sqldf. Could this be an indication of some conflict between sqldf and knitr/rmarkdown?
Another question, could I run "knit HTML" on command window of an R session from the server where I could call the newer version of R so that I could generate the desired pdf/html/doc output file?
Thanks,
Bob