Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcast and enviroments #18

Closed
mnel opened this issue Apr 19, 2012 · 0 comments
Closed

dcast and enviroments #18

mnel opened this issue Apr 19, 2012 · 0 comments

Comments

@mnel
Copy link

mnel commented Apr 19, 2012

When using knitr with caching, I came across a problem associated with dcast.

It is reported in yihui/knitr #207 and may be the same as
ggplot2 #377

eval(parse(text = "
library(reshape2)
df = data.frame(x = letters[1:2], y = letters[1:3], z = rnorm(6))
g = c('b', 'a')
dcast(df, y~ordered(x, levels = g))
"), envir = new.env())

which gives

Using z as value column: use value.var to override.
Error in factor(x, ..., ordered = TRUE) : object 'g' not found
@hadley hadley closed this as completed in 562dd64 Apr 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants