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

Ista Zahn istazahn at gmail.com
Fri Mar 19 22:44:56 CET 2010


Hi Jose,
If you give us a reproducible example we can test it out and try to
help you find the problem.

-Ista

On Fri, Mar 19, 2010 at 5:38 PM, jose romero <jlaurentum at yahoo.com> wrote:
> 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 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.
>
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



More information about the R-help mailing list