Using Sweave with beamer in LYX

Yihui Xie1

January 9, 2013

1

many thanks to Liviu Andronic who contributed the beamer-fragile.module;
a PDF version of this example is at
https://bitbucket.org/stat/lyx/downloads/lyx-sweave-beamer.pdf

org/stat/lyx/downloads/sweave.pdf . not the Sweave manual in R!) I https: //bitbucket.B.Requirements I you cannot use Sweave directly with beamer in LYX. since LYX does not have direct support for fragile frames I see FAQ 1 in the Sweave manual in LYX for details (N.

5892 .09886 1.01 '*' 0. Error t value Pr(>|t|) (Intercept) 30.A fragile frame with R code > options(width = 60.7121 -2.742 1. Adjusted R-squared: 0.421 < 2e-16 *** hp -0.05 '. codes: 0 '***' 0.5819 Max 8.01012 -6.2360 Coefficients: Estimate Std.' 0.1122 -0.001 '**' 0. data = mtcars) Residuals: Min 1Q Median -5.06823 0.863 on 30 degrees of freedom Multiple R-squared: 0.6024.63392 18. data = mtcars)) Call: lm(formula = mpg ~ hp. useFancyQuotes = FALSE) > summary(lm(mpg ~ hp.8854 3Q 1.79e-07 *** --Signif.1 ' Residual standard error: 3.

:3. :472.217 3rd Qu.581 Median :3.:22.:120.930 vs disp Min.597 3rd Qu.0 Max.:180.20 Mean :20. :8.: 96. : 52. :5. :4.8 Median :196.0 1st Qu. :1. :4.513 1st Qu.0 qsec cyl Min.0 Mean :146.325 Mean :3.5 Median :123.695 Mean :3.09 3rd Qu.80 Max. :2.0 wt Min.000 Median :6.1 1st Qu.080 Median :3. : 71.90 hp Min.188 3rd Qu.000 Mean :6.424 am . :335.:2.:4.:326.:3.:3. :33.000 Max.0 Max.000 drat Min.7 3rd Qu.000 1st Qu.40 1st Qu.43 Median :19.7 3rd Qu.:8. :10.760 1st Qu.920 Max.A fragile frame spans over two pages I > summary(mtcars) mpg Min.3 Mean :230.610 Max.:15.

:1. :3.0000 Mean :0. :1.000 Mean :3.85 3rd Qu.:4.0000 Max. :22. :1.000 Mean :2.71 Mean :17.4375 3rd Qu.000 Max.:0.0000 1st Qu.000 1st Qu. :0.0000 Median :0.:4.000 1st Qu. :0. :1.:2.:0.000 Median :4. :5.:18.0000 1st Qu.000 Median :2.0000 Mean :0.0000 Max.688 3rd Qu.000 Max.90 Max.0000 . :14.4062 3rd Qu.90 gear Min.:3.50 1st Qu.A fragile frame spans over two pages II Min. :8.:1.0000 Median :0.:16.000 Min.89 Median :17.000 Min.812 3rd Qu.0000 carb Min.

Sign up to vote on this title
UsefulNot useful