Search found 2 matches

by greenStone
Mon Jun 29, 2015 11:27 pm
Forum: Graphics, Figures & Tables
Topic: Convert xtable into multiple columns
Replies: 1
Views: 4518

Convert xtable into multiple columns

I have an .Rnw file in RStudio (which I am pasting below). I am displaying a data frame using the xtable() function. In the example below, the data frame contains 26 rows. I convert the .Rnw file to .tex to .pdf, using the following commands:


library(knitr)
knit("code.Rnw","code.tex")
pdflatex ...
by greenStone
Sat Jun 06, 2015 8:41 pm
Forum: General
Topic: Creating functions in Sweave
Replies: 0
Views: 2441

Creating functions in Sweave

I have a Sweave .Rnw file in R. It does a few things across chunks:


- Chunk 1: Selects a random integer between 1:4 and saves as variable nPlots.

- Chunk 2: Writes nPlots (random integer selected earlier) number of .txt files to current directory. Writes one .jpg file to current directory ...