Java Mailing List Archive

http://www.r-help.com/

Home » R Help for Statistical Computing »

[R] Sweave and " object of type 'closure' is not subsettable" error

jose romero

2010-03-19

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello folks:

I have a data frame which includes two numeric vectors: "Pa1" and "Ingr" (which represents income).  I run the following code on the R console:

ingreso <- factor(ifelse(Ingr<=3000,"bajo","alto"))
tapply(Pa1,ingreso,summary)
boxplot(Pa1~ingreso)

and it works fine.  However, when I "Sweave" through an rnw file containing that code, R gives me the following error:

Error:  chunk 19 (label=cod3.19)
Error in object[[i]] : object of type 'closure' is not subsettable

What's going on here?

Thanks in advance,
jlrp


 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.