[ESS] Weird knitr error
Vitalie Spinu
spinuvit at gmail.com
Thu May 2 19:41:26 CEST 2013
ESS weaves witht he following command:
local({..od <- getwd(); setwd("dir_of_foo"); require(knitr); knit("foo.Rnw"); setwd(..od) })
My guess is that knitr does some fancy evaluation that relies on knit
being called at top level. In that case it is more of an knitr issue.
Vitalie
>> Kevin Wright <kw.stat at gmail.com>
>> on Thu, 2 May 2013 10:13:11 -0500 wrote:
> Windows 7, latest stable ESS, R 32 bit.
> I have a rnw file that I'm converting to pdf using knitr. The output below
> is copied from the pdf. Note the final error message indicates that "datm"
> cannot be found, even though ls() and head() can find "datm"!
> RStudio compiles this just fine.
> How do I debug this error?
> Kevin
R> ls()
> [1] "dat" "datm" "datna" "datr" "gam" "ge" "M" "m.er" "m.ev" "m.fw"
> [11] "m.fw0" "m.sv" "m.tw" "mm" "mr" "p.er" "p.ev" "p.fw" "p.sv" "p.tw"
> [21] "pm" "pr" "vars"
R> head(datm)
> env gen yield
> 1 87:GGA Bienvenu 1.442
> 2 87:ID Bienvenu 1.242
> 3 87:MT Bienvenu 2.616
> 4 87:NC Bienvenu 1.001
> 5 87:OR Bienvenu 4.556
> 6 87:SC Bienvenu 2.500
R> datm$res <- resid(mm)
> Error: object datm not found
More information about the ESS-help
mailing list