similar to: Sweave: \Sexpr and variables with special chars

Displaying 20 results from an estimated 1000 matches similar to: "Sweave: \Sexpr and variables with special chars"

2009 Feb 04
2
Sweave and \Sexpr{}
Hi: I am trying to create a dynamic latex table using \Sexpr{} but it's not evaluating it. I also tried the example below without Sweave and also fails. I have also copied the Sweave.sty to my working directory but nothing seems to work. Do I need to have certain package in order to run \Sexpr{}? \documentclass[a4paper]{article} \usepackage{C:/R/R-2.8.1/share/texmf/Sweave} \begin{document}
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
2007 Mar 04
1
Problem using callNextMethod() in S4
Dear all, Maybe, I am doing something wrong, but using R-2.5.0 on my Intel-Mac, I have problems using function callNextMethod() in method initialize. I am loading the following code as file "testS4.R": setClass("baseClass", representation(myname = "character", mydir = "character", "VIRTUAL"),
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 Apr 03
3
Sweave xtable
Hola Tengo un problema con Sweave y xtable, concretamente quiero cambiar el color según un criterio, creo que es más fácil explicar con los siguientes ejemplos, uno puede correr directamente porque es R, al siguiente código hay que guardarlo como Rnw, y luego puede ser corrido en R, donde seguramente al correr este se darán cuenta de mis dos problemas porque saltan al abrir el pdf que se obtiene
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2008 Jun 17
3
Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
R users, I'm at a loss with a problem considering running .tex files produced by Sweave. When I run (R 2.7.0): --------------------------------------------------- #Taken from ?Sweave testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") ## enforce par(ask=FALSE) options(device.ask.default=FALSE) ## create a LaTeX file Sweave(testfile)
2011 Mar 03
2
Greek character and R
Dear R users. In a loop, I set the title of my graph with : mytitle = expression(paste(delta^13,'C Station ', i) title(mytitle) However, instead of using value of i, it will literally use "i" character. Any one know the way to concatenate the value of i to the mathematical expression? With regards, Phil -- View this message in context:
2006 Feb 13
2
Sweave, mle and curve
I am trying to write a lesson on maximum likelihood with Sweave. I get a surprising result with the following code, lec4.Snw: \documentclass[a4paper,12pt]{article} \usepackage[latin1]{inputenc} \title{Maximum likelihood} \author{G伱伓ran Brostr伱伓m} \begin{document} \maketitle <<fig=TRUE>>= ## Simulate Y: n <- 25 Y <- sum(rpois(n, lambda = 1)) Y ## Define minusloglik:
2008 Mar 24
2
Newbie help with Sweave
I think I've gotten my Emacs/Sweave/R system set up correctly, thanks to Vincent and Jim, but I haven't been successful getting my first document produced. I'm trying to use one of Friedrich Leisch's examples, http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw. I cut and pasted the text into a document sweaveexample.Rnw in Emacs. It seemed to be processed successfully with R:
2004 Feb 05
2
Sweave problem
Here is the file minimal.Snw: \documentclass[a4paper]{article} \title{R tips and tricks} \author{Murray Jorgensen} \usepackage{Sweave} \begin{document} \maketitle \section*{Entering data from a single variable} The following data are transformed tensile strength measurements on polyester fibres. They may be found on the file \texttt{TENSILE.DAT}. We may enter this data into R using the
2008 Sep 25
2
ggplot, qplot in loop
Dear List, yes, me again trying to work with qplot ;-) I would like to make several single plots within a loop, like this (simplified and so on...): trials <- c("A","B","C") mycolours <- ("wheat","darkolivegreen","lightgreen",
2010 Nov 11
4
Troubleshooting sweave
Hi All, I've reproduced the example from Prof. Friedrich Leisch's webpage. When I write sweave("Example-1.Snw") OR sweave("Example-1.Rnw"), (yes, I renamed them). I get the following error: Writing to file example-1.tex Processing code chunks ... 1 : echo term verbatim Error: chunk 1 Error in library(ctest) : there is no package called 'ctest' Also while
2017 Mar 14
2
gráfico jpg png
Estimados Hace unos días envié un correo porque tenía problemas para guardar los gráficos en el disco rígido, utilizando R server 9, comentaba que el código antes funcionaba pero que tenía fallas. No encuentro mi mensaje en la lista para continuar el hilo, encontré el problema, no lo comprendo del todo pero cambiando jpg por png funciona, aparentemente hay un inconveniente para guardar en jpg.
2017 Jan 13
3
input en markdown
Hola lista: Una duda rápida (espero). ¿Se puede hacer un "inlcude" o un "input" en markdown? sin emplear Rmarkdown o knitr.... solo puro markdown, de modo que por ejemplo github lo interprete o un visor básico de markdown. la idea es q un file muestre(contenga) todo pero tener la info distribuida en varios files. Gracias. -- Antonio Maurandi López Sec. Apoyo
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers, I hope there is a really simple solution to my problem. I've written a function that I saved in an .r file. I source this file in my code. For a while it worked fine. But then when I run the line: source("F mylineplot.r") I started getting a warning: In readLines(file) : incomplete final line found on 'F mylineplot.r' I have no idea why - I tried to check and
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the
2018 Jul 12
2
Top level \Sexpr and R CMD check
I would like to create \examples{} in the manual dynamically, and while it is possible to do this with a \Sexpr at the top level, R CMD check issues a warning for it. (See below.) Is it intentional that \Sexpr is not allowed at the top level? The Rd grammar allows this, but R CMD check does not. Is there any other way to generate/modify the \examples{} section dynamically? Thanks, Gabor In
2013 Feb 14
3
[PATCH] tools/xend: Only add cpuid and cpuid_check to sexpr once
# HG changeset patch # User Jim Fehlig <jfehlig@suse.com> # Date 1360861948 -3600 # Node ID 0f9c7503650fa1b1103b769e1129d66ff614b2ad # Parent cffb489a6df37d8d114e7d2d53a7a85d14e8f968 tools/xend: Only add cpuid and cpuid_check to sexpr once When converting a XendConfig object to sexpr, cpuid and cpuid_check were being emitted twice in the resulting sexpr. The first conversion writes