5

The error that I get is:

processing file: 1.Rmd
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'stringi'
Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

I've tried installing the stringi package and loading it using the library function. But I still get the error.

I use R Studio Version 0.99.441 on on Mac OS X 10.6.8.

Jash Shah
  • 2,064
  • 4
  • 23
  • 41
  • you probably used the package in your rmarkdown-file, so you need to load inside the document you are trying to knit – grrgrrbla Jun 26 '15 at 09:52
  • `install.package("stringi")` ? – juba Jun 26 '15 at 10:06
  • I tried using your method but it does not seem to work. If still can't knit an HTML file on R Markdown. I tried installing string on both my console in R Studio and my R Markdown document. Do you know any other way? – Jash Shah Jun 26 '15 at 11:24
  • Can you see whether your code chunks run in the console? – Nick Kennedy Jun 26 '15 at 11:54
  • I suspect you have the same issue as http://stackoverflow.com/questions/31038636/package-stringi-does-not-work-after-updating-to-r3-2-1 and have been unsuccessful in updating the stringi package because you don't have the tools installed to install the package from source. See the link I posted there. Because your version of MacOs X is rather old, you'll need a legacy version of Xcode. – Nick Kennedy Jun 26 '15 at 12:08
  • Maybe you're running the console from a library, but markdown is using a different library without the packages? I've seen something similar before. – Molx Jun 26 '15 at 13:43

3 Answers3

3

I Just had this same problem but on a windows computer here is how I fixed it:

  1. Go to the windows folder where all the r packages are stored in when r installs a package it states the folder. I copy and pasted that address into windows explorer. (mine ended with R\win-library\3.2)

  2. Delete the folder stringi (which is essentially deleting the package stringi)

  3. Re-install stringi using install.packages('stringi')

This should work.

Jakuje
  • 24,773
  • 12
  • 69
  • 75
Box and Cox
  • 174
  • 2
  • 5
2

Answering it myself.

I updated my version of OS X and RStudio seems to knitting HTML files perfectly.

Thank you for your answers.

Jash Shah
  • 2,064
  • 4
  • 23
  • 41
0

I'm a total nube (two days of actual R experience) but this is what I did to solve this problem.

I went to packages -> install -> stringi & stringr

Click on the "Install dependencies box"

Make sure that after you install these packages to click the check box on the stringi and stringr boxes under the "Packages" tab.

require both the stringi and stringr

I would suggest that you just test it in the Console section before you try to do anything else.

Nate
  • 1