Just a collection of some random cool stuff.
PS. Almost 99% of the contents here are not mine and I don't take credit for them, I reference and copy part of the interesting sections.
- use latex2rtf to export it to an rtf file which can be opened in word
- export to PDF and have the PDF edited using Acrobat Pro
- add line numbers, manual e-mail of revisions
both will need some manual editing to apply changes back to latex :(
- or do everything in word first, then make the final submission in latex?
I tried to use \usepackage{times} to set my document in the times font, I get an error message: "! Font OT1/ptm/m/n/10=ptmr7t at 10.0pt not loadable: Metric (TFM) file not found" Why doesn't it work?
<>=
n <- 50
x <- seq(1, n)
a.true <- 3
b.true <- 1.5
y.true <- a.true + b.true * x
s.true <- 17.3
y <- y.true + s.true * rnorm(n)
out1 <- lm(y ~ x)
summary(out1)
@
The commands in package lattice have different behavior than the standard plot commands in
the base package: lattice commands return an object of class "trellis", the actual plotting is
performed by the print method for the class. Encapsulating calls to lattice functions in print()
statements should do the trick, e.g.:
<>=
library(lattice)
print(bwplot(1:10))
@
The two Latex editors that I found most useful are: 1. Texmaker - lightweight, spell-check, have to press F1 and F3 to generate a PDF, need to click on the log window a lot 2. Kile - nicer, but I couldn't get syntax coloring to work for Sweave, spell-check, one-click gets you a PDF
Trick
- if you rename your '.Rnw' to '.tex' as a work around, it plays nicely with the editors
- then once all formatting is done, copy '.tex' to '.Rnw' and run the command
- or just create a tex symlink to Rnw! ln -s mydoc.Rnw mydoc.tex
R CMD Sweave mydoc.Rnw && texi2pdf mydoc.tex && evince mydoc.pdf
In R, call
> Stangle(file='foo.Rnw')
to extract the R code, WARNING: this will overwrite 'foo.R'!!!!!