could not find function "knitr"

I am very new to R. I was asked to install/update a series of packages which went ok. However, one of the users is reporting they can't find knitr. The command they execute is: knitr("generalizedPredictionWrapper.Rmd")

What I checked:
I installed into /opt/Rpackages
u/g are root:root
permissions look ok

total 4
-rwxr-xr-x 1 root root 950 Feb 28 13:28 knit

.Rprofile is:


cat(".Rprofile: Setting UK repository\n")
r = getOption("repos") # hard code the UK repo for CRAN
r["CRAN"] = ""
options(repos = r)

lib paths are:

[1] "/opt/Rpackages" "/usr/local/lib/R/site-library"
[3] "/usr/lib64/R/library" "/usr/share/R/library"

what am I missing?

knitr is the package name but the function you want is knit()


knitr is the name of the package, there is no knitr() function. I imagine you're looking for knit().

many thanks to the both of you. Now I can move onto the next problem :wink:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.