Displaying 8 results from an estimated 8 matches for "sweavesyntax".
2007 Oct 07
5
how to use \Sexpr{} with sweave
I'm trying to learn Sweave. So far things are going well with the chunks of code identified by << >>=
But I'm having trouble with the in-line text use of \Sexpr.
Here is a short example .Rnw file:
\documentclass[12pt]{article}
\usepackage[margin=1.25in]{geometry}
\usepackage{graphicx}
\usepackage{Sweave}
\begin{document}
<<test>>=
pnorm(1)
@
\Sexpr{2+6}
2010 Oct 22
1
trouble with \textless in Hmisc latex() on a drop1 object
...pace, changng it to
\textless none\textgreater
the document compiles fine.
Reproducile example below. Any suggestions?
Thanks.
Chris Ryan
SUNY Upstate Medical University Binghamton Clinical Campus
\documentclass{article}
\begin{document}
<<options, echo=FALSE, hide=TRUE>>=
options(SweaveSyntax = "SweaveSyntaxNoweb")
library(Hmisc)
@
<<code>>=
salmon <- data.frame(cbind(c(rep(0,49),rep(1,51)), rnorm(100), rnorm(100)))
names(salmon) <- c("country","freshwater","marine")
model1 <- glm(country~freshwater+marine, family="binom...
2010 Dec 14
1
embed Sweave driver in .Rnw file
...eaveDriver[{](.*)[}]", "\\1", line[1L] )
+ driver <- try( eval( parse( text = txt ) ), silent = TRUE )
+ if( !inherits( driver, "try-error") ) driver
+ }
+}
+
Sweave <- function(file, driver=RweaveLatex(),
syntax=getOption("SweaveSyntax"), ...)
{
@@ -28,7 +38,9 @@
else if(is.function(driver))
driver <- driver()
-
+ drv <- SweaveGetDriver(file)
+ if( !is.null(drv) ) driver <- drv
+
if(is.null(syntax))
syntax <- SweaveGetSyntax(file)
if(is.character(syntax))
This all...
2008 Apr 17
1
odfWeave \Sexpr
Dear All,
Using odfWeave is working fine for me using code chunks <<...>>= ... @
But the inline \Sexpr{date()} is not evaluated and returns again
\Sexpr{date()} instead of "Thu Apr 17 18:15:47 2008".
What might be the reason for that, what do I have to look for?
I'm using Windows XP, R 2.6.1, odfWeave_0.7.3 and OpenOffice 2.4.
Session Info:
R version 2.6.1
2012 Apr 02
1
\Sexpr{}
Did anyone know whether the problem " it doesn't evaluate \Sexpr{} in Sweave" has been fixed? I checked r help page and realized it was asked a couple of years ago. But I didn't find solutions.
Thanks for your help in advance!
Hua
[[alternative HTML version deleted]]
2004 Jul 05
1
Apparent conflict between \Sexpr in Sweave and R2HTML
I have come across an apparent bug in the operation of Sweave. If I
load the package R2HTML then execution of \Sexpr{} in an *.Rnw file no
longer works. The \Sexpr{} code is simply written to the *.tex file.
Below are my *.Rnw file, commands, and output.
The Sweave file, Sweave-test-1_short.Rnw:
% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
\documentclass{article}
\title{A Test
2012 Feb 23
1
Sexpr not getting expanded in Sweave
An Sweave file, 'test.Rnw':
\documentclass{article}
\title{Sweave minimal}
\author{MK}
\begin{document}
\maketitle
We try Sweave:
<<1>>=
data(airquality)
summary(airquality)
x <- airquality[1, 1]
@
I try Sexpr: \Sexpr{x}
We plot:
\begin{center}
<<2, fig=TRUE, echo=FALSE >>=
boxplot(Ozone ~ Month, data = airquality)
@
\end{center}
\end{document}
I check the
2010 Sep 17
1
odfWeave UTF-8 error and latin characters
...la2, echo = FALSE, results = xml>>=
odfTable(tabela2,useRowNames=T,name ='Tabela 2')
@
in R console ...
>library(odfWeave)
>imageDefs <- getImageDefs()
>imageDefs$type <- 'bmp'
>imageDefs$device <- 'bmp'
>setImageDefs(imageDefs)
>options(SweaveSyntax="SweaveSyntaxNoweb")
>odfWeave('teste.odt','figura1.odt')
Copying teste.odt
Setting wd to
C:\Users\PEDROE~1\AppData\Local\Temp\Rtmpfv32oJ/odfWeave0215405313
Unzipping ODF file using unzip -o "teste.odt"
Archive: teste.odt
extracting: mimetype
creat...