[R] Sweave and the "[" function

Berwin A Turlach berwin at maths.uwa.edu.au
Tue Sep 5 13:22:18 CEST 2006


G'day all,

>>>>> "RD" == Ross Darnell <r.darnell at uq.edu.au> writes:

    RD> Hi Vincent This would seem logical but in this case doesn't
    RD> work.
Well, he said that it was untested. :)

Same idea, but with a slightly different implementation (and this one
works, I have tested it):

<<>>=
str(women)
women$height
women[,1]
@
\begin{Sinput}
> "["(women,1)
\end{Sinput}
<<echo=FALSE, eval=TRUE>>=
"["(women,1)
@

HTH

Cheers,

        Berwin

========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)   
School of Mathematics and Statistics        +61 (8) 6488 3383 (self)      
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: berwin at maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin



More information about the R-help mailing list