0

I'm starting to learn/use R. I'm using RStudio and I've come across what I'm sure is a "dumb question" but I've had no luck with looking on CRAN or anywhere else.

I'm trying to install a package. I've downloaded the package and placed it in a folder `R\Packages' in My Documents. I've written this script in RStudio to get the package working

install.package("knitr", lib="C:\Users\dnthompson\Documents\R\Packages")

but I get an error that says

Error: '\U' used without hex digits in character string starting ""C:\U"

Whats up with this?

4
  • 2
    You need to use "/" instead of "\" in file paths.
    – konvas
    Commented Apr 1, 2015 at 20:40
  • brand new error `Error: could not find function "install.package"
    – JohnN
    Commented Apr 1, 2015 at 20:41
  • 6
    its install.packages :)
    – konvas
    Commented Apr 1, 2015 at 20:41
  • Haha, like I said, "dumb question" Judging by the loads of things that just ran through my console, I think it worked! Thank you!
    – JohnN
    Commented Apr 1, 2015 at 20:46

1 Answer 1

0

It should be "install.packages()", instead of "install.package()".

Not the answer you're looking for? Browse other questions tagged or ask your own question.