search for: sexpr

Displaying 20 results from an estimated 157 matches for "sexpr".

Did you mean: expr
2011 Oct 28
3
R CMD check and error in an \Sexpr in an Rd file
Hi, another Rd related issue I encountered is that if an error occurs in an \Sexpr in an Rd file, then on get the following error: * checking for portable compilation flags in Makevars ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking examples ... ERROR Error in paste(before, x, after, sep = "") : object 'exfile' not found...
2023 Feb 05
1
R2HTML doesn't split paragraphs originating from \Sexpr[results=rd]
Hello, Here's an example that renders correctly using Rd2txt / Rd2latex / R CMD Rd2pdf, but has problems under Rd2HTML: \name{foo} \title{foo} \section{foo}{ This should be on a separate paragraph This should be on a separate paragraph This should be on a separate paragraph \Sexpr[stage=render,results=rd]{ paste( rep('Sexpr: This should be on a separate paragraph', 3), collapse = '\n\n' ) } } For the text I've typed manually, there are <p>...</p> tags splitting the text separated by empty lines into paragraphs. The \Sexp...
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 incorrect sexpr, causing parsing of the sexpr to fail when xend is restarted and domain sexpr files in /var/lib/xend/domains/<dom-uuid> are r...
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 line is commented. This results in the following .tex file content (in the case of R 2.4.0): \documentclass[10pt]{article} \usepackage{/home/marcs/R.Files/S...
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 line is commented. This results in the following .tex file content (in the case of R 2.4.0): \documentclass[10pt]{article} \usepackage{/home/marcs/R.Files/S...
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 the Rd file:...
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List, First off, my deepest gratitude to the Sweave developers: this tool has improved my quality greatly. A question in my work I use \Sexpr{} statements scalar values and the xtable package for all manner of tables. What I'd like to do is to use a vector inline, rather than a whole separate table. Something like: %%%%%%%%%%%%%%%% begin code % Latex junk % Sweave block: <<>>= covmat <- cov(matrix(runif(100),ncol=...
2018 Jul 12
2
Top level \Sexpr and R CMD check
On Thu, Jul 12, 2018 at 12:23 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 12/07/2018 6:33 AM, G?bor Cs?rdi wrote: > > 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 \exampl...
2008 Mar 19
4
Sweave does not parse \Sexpr{}
Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex perfectly fine but somehow only the \Sexpr{} tags are not parsed. This is an example .Rnw: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} And this is the resulting .tex: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} Can anybody give me a...
2010 Nov 19
1
a rounding option for \Sexpr{}?
Hi all, Currently Sweave does not format the (especially numeric) value in \Sexpr{}, and I often have to round() the numbers explicitly, otherwise I will get more than 10 digits, which is not necessary for me in most cases. Is there a way to specify the number of digits to be kept for values in \Sexpr{}? e.g. can we make \Sexpr{} respect getOption('digits')? Thanks! Re...
2010 Jan 20
1
function curve() (PR#14191)
...on". Naturally, the user message uses "expression" in its usual generic meaning but it is somewhat confusing that an object of type "expression" is rejected. The message is produced in the following piece in the source of function curve() else { if (!(is.call(sexpr) && match("x", all.vars(sexpr), nomatch = 0L))) stop("'expr' must be a function or an expression containing 'x'") expr <- sexpr if (is.null(ylab)) ylab <- deparse(sexpr) } The "if" statement o...
2006 Sep 21
2
Sweave processes \Sexpr in commented LaTeX source
Marc, >I have a large .Rnw file and was in the process of doing some debugging. >I had set some R chunks to 'eval=false' in the process. This resulted in >some R objects not being created that were in turn used in the >subsequent \Sexpr's. I have often the same problem, I'm using a construct like : <<eval=F>>= x <- rnorm(100) @ I have \Sexpr{ifelse(exists("x"), length(x), "???")} elements in vector x. This works well for me, and you have more control than a global \SweaveOpts{eval.Sex...
2018 Jul 12
3
Top level \Sexpr and R CMD check
On Thu, Jul 12, 2018 at 2:21 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > I think I found the bug. The tools::checkRd function only processes > \Sexpr's with "stage=render". I think the author (who might have been > me, I forget) assumed that would imply all the earlier stages as well, > but apparently it doesn't. > > So you could use that as a workaround. > > I'll do some more checking, then submit a bug...
2019 Oct 08
0
\Sexpr{} within \examples{}
Hi all, I am trying to use \Sexpr{} within \examples{} in the manual, and it all works fine, except that I get an error and then a NOTE from R CMD check when it checks for long lines in the manual. The long line check calls `Rd2txt` with fragment = TRUE, because it only checks the \usage{} and \examples{} sections, but fragment =...
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} \end{document} The .tex file that it yields contains \Sexpr{2+6} as its next-to-la...
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...
2003 Sep 24
1
Sweave \Sexpr() issue
Hi, I'm having a little issue with \Sexpr{bla} relating to the number of digits it is using to print its output. I understand that what \Sexpr{bla} does is parsing 'bla' inside R and then returns it coerced into a character string. The problem I'm having is that I'm losing control over the number of digits it's using to...
2009 Jun 30
2
Sweave: multiline Sexpr?
Is there any way to have Sexpr span multiple lines? -- David ? ----------------------------------------------------- David Huffer, Ph.D. Senior Statistician CSOSA/Washington, DC david.huffer at csosa.gov -----------------------------------------------------
2011 Jan 26
2
Sweave: \Sexpr{} inside <<>>?
Hi, Is it possible in Sweave to put \Sexpr{} inside <<>>? This is a bad example, but here goes: <<results=hide>> Age <- 5 @ <<>> x <- \Sexpr{Age} @ I'm trying to get it to display x <- 5, rather than x <- Age. It's probably so obvious I'm going to feel sorry for having to ask,...
2010 Jul 12
1
How to select the column header with \Sexpr{}
Hi: Since I work with a few different fish runs my column headers change everytime I start a new Year. I have?been using \Sexpr{} for my?row and columns and now I am trying to use with my?report column headers.?\Sexpr{1,1} is?row 1 column 1, what can I use for headers? I tried \Sexpr{0,1} but sweave didn't like it..Thanks in advance for any hints ? Felipe D. Carrillo Supervisory Fishery Biologist Department of the In...