[R] Making Knitr work

Yihui Xie xie at yihui.name
Wed Mar 28 19:38:57 CEST 2012


You must have set the package option 'base.dir'
(opts_knit$set(base.dir = ....)), and this directory does not exist.

I do not recommend you to use this option unless you really understand it.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Wed, Mar 28, 2012 at 11:09 AM, Jessica Streicher
<j.streicher at micromata.de> wrote:
> Might not be the best place to ask, but i could get lucky..
>
> I have setup an eclipse environment to write sweave files lately and wanted to switch to knitr. I could get it to work on easy files, but my earlier written sweave file fails to be knit properly.
>
> Here is the error message:
>
> Quitting from lines 273-276: Error in setwd(base.dir) : kann Arbeitsverzeichnis nicht wechseln (it says: cannot change workspace)
>
> The chunk that is 273-276:
>
> <<getdata,echo=F>>=
> library(e1071)
> source("/src/TestRandomStuff.R")
> allData<-createNormallyDistributedClasses(2, c(-2,2), 50, 2)
> @
>
> Further mentions of the chunk in console (its strangely listed twice):
>
> |>>>>>>>>>>>>>>>>>>>>>>>>                                         |  37%
> label: getdata (with options)
> List of 1
>  $ echo: logi FALSE
>
> label: getdata (with options)
> List of 1
>  $ echo:length 1 F
>  ..- attr(*, "id")= int 98
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list