Old versions of RStudio may have problems with finding add-on
packages. The first thing that you can do is to make sure you are
using the latest version of RStudio. If the latest version does not
work, check
find.package(c('ggplot2', 'rdatamarket'))
In your case, I bet rdatamarket was installed in a different library
location. Reinstall this package may help. If the problem still
exists, you need to report to
http://support.rstudio.org/help/discussions/problems
Regards,
Yihui
--
Yihui Xie <
xiey...@gmail.com>
Phone:
515-294-2465 Web:
http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Sat, Aug 25, 2012 at 6:48 PM, Ricardo Mayer <
ricard...@gmail.com> wrote:
> Dear all,
>
> I'm a knitr noob and I have come across a strange error.
>
> I'm using an R package called rdatamarket.
>
> If a write a chunk to load this package with library(rdatamarket), the
> following happens:
>
> + If, in RStudio, I "Evaluate the current chunk" , then all goes well
> and the package is found and load
>
> + BUT if I press Knit HTML, then the same chunk fails and I get an
> error message: "## Error: there is no package called 'rdatamarket'"
>
> However, nothing goes wrong loading some other package, such as "ggplot2"
> or "tables"
>
> is this a knitr problem, RStudio problem or rdatamarket problem?
>
> Thanks in advance!!!
>
> PS. I've attached a simple Rmd file where to appreciate this problem