From: Andrew Robinson <A.Robinson_at_ms.unimelb.edu.au>

Date: Fri, 23 May 2008 20:18:00 +1000

Date: Fri, 23 May 2008 20:18:00 +1000

Martin,

try omitting the results=tex argument.

Andrew

On Fri, May 23, 2008 at 10:16:33AM +0200, martin.gaston_at_unavarra.es wrote:

> Dear R users,

*> I'm working in a brief R-tutorial to a group of students. To make that I'm
**> using Sweave but I've got two problems:
**>
**> First, I want show how R operates with the matrix type but, I write in the
**> .rnw document the code
**>
**> <<echo=T,results=tex>>=
**> matriz <- matrix(vector,nrow=3,ncol=6)
**> matriz
**> @
**>
**> and after compilating the LaTex document I obtain in the pdf the next text
**>
**> > matriz <- matrix(vector, nrow = 3, ncol = 6)
**> > matriz
**> [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 4 1 4 1 4 [2,] 2 5 2 5 2 5 [3,] 3 6 3
**> 6 3 6
**>
**> My question is, How must I do To obtain in the pdf somethin near to
**>
**> > matriz <- matrix(vector, nrow = 3, ncol = 6)
**> > matriz
**> [,1] [,2] [,3] [,4] [,5] [,6]
**> [1,] 1 4 1 4 1 4
**> [2,] 2 5 2 5 2 5
**> [3,] 3 6 3 6 3 6
**>
**> I`ve tought in xtable but the aspect is not as the R console.
**>
**> On the other hand I want show the list type R-treatment, the problem here
**> is in the LaTex compilation
**> I write in the .rnwd document
**>
**> <<echo=T,results=tex>>=
**> lista <- list(cadena='String',vector=c(1,1,1),logica=TRUE)
**> lista$cadena
**> @
**>
**> the Sweave call is ok, but when I compile the .tex document, It produces
**> errors caused by the $ simbols. Anybody knows how save this problem?
**>
**> Thanks in advance,
**> Mart?n Gast?n
**>
**> ______________________________________________
**> 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.
*

-- Andrew Robinson Department of Mathematics and Statistics Tel: +61-3-8344-6410 University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599 http://www.ms.unimelb.edu.au/~andrewpr http://blogs.mbs.edu/fishing-in-the-bay/ ______________________________________________ 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.Received on Fri 23 May 2008 - 10:43:16 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 11:30:40 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*