Displaying 20 results from an estimated 100 matches similar to: "Apparent conflict between \Sexpr in Sweave and R2HTML"
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
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, just the same, I'm
stumped. Any ideas? Thanks.
--
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
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
-----------------------------------------------------
2012 Sep 20
2
Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}
Depending on an R computation I would like to include an Sweave documents
in the main Sweave document.
How can I do it?
So I was thinking .... to use Latex features :
\newif\ifpaper
\ifpaper
\SweaveInput{"my1.Rnw"}
\else
\SweaveInput{"my2.Rnw"}
\fi
But how do I set paper to true or false given an \Sexpr ??
\papertrue % or
\paperfalse
Any ideas?
cheers
--
Witold
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 print it's output.
For example, let's take:
2010 Nov 16
1
Sweave: \Sexpr and variables with special chars
I am using \Sexpr to include a variable in a title of a Sweave document:
\documentclass[a4paper]{article}
<<echo=false, results=hide>>=
#mytitlevar <- "Stuff" # case 1, everything is find
mytitlevar <- "Stuff_first" # case 2, f is turned into sub-text
@
\title{MyTitle: \\ \Sexpr{mytitlevar} }
\begin{document}
\maketitle
\end{document}
When doing this, the
2010 Sep 07
0
Sexpr in package.Rd fails
If I
f = function() {}
package.skeleton("PkgA", "f", path="/tmp")
and then edit man/PkgA-pacakge.Rd to read in part
\description{
More about what it does (maybe more than one line)
\Sexpr{1}
}
and then
R CMD build PkgA
I end up with
Saving output to ?/tmp/PkgA/build/PkgA.pdf? ...
Warning in file.create(to[okay]) :
cannot create file
2011 Feb 25
1
Sexpr problem
Hi.
I am having difficulty making \Sexpr work as desired.
Specifically, the pdf and the text versions of the help system
differ, and I can't reproduce the example on page 63 of
the R Journal article by Murdoch and Urbanek (Vol 1/2,
December 2009).
Is there an example package that I could examine for Best Practice?
thanks
--
Robin Hankin
Uncertainty Analyst
hankin.robin at gmail.com
2018 Jul 12
0
Top level \Sexpr and R CMD check
On 12/07/2018 7:30 AM, G?bor Cs?rdi wrote:
> 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
2018 Jul 12
0
Top level \Sexpr and R CMD check
On Thu, Jul 12, 2018 at 2:30 PM G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:
>
> 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
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 = TRUE
does not evaluate \Sexpr{}, and then an unevaluated \Sexpr{}
2009 Feb 06
1
format \Sexpr{}
Hi everyone:
It is probably something simple but I can't find anything related to this. Could someone show me how to format the sum of x. the result is 10000 but I need comma formatted like this: 10,000. Since I am going to be using this number to be added to another calculation, I want to be able to remove the comma from the 10,000 value. Thanks
x <- c(2000,3000,5000)
this is the sum of
2010 Jan 30
1
Sweave - have Sexpr print 3 digits when the last is 0
Hi,
I want 3 digits printed even if the last one is zero with \Sexpr{}
For example:
> ghg.06[12]
[1] 0.2501008
I want: 0.250
What I've tried:
\Sexpr{round(ghg.06[12],3)}
0.25
\Sexpr{format(ghg.06[12])} % set options(digits=3) in earlier rnw chunk
0.25
\Sexpr{round(ghg.06[12],4} %but I want 3 not 4 digits
0.2501
Thanks in advance.
Elizabeth Stanny
epstanny at gmail.com
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
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!
Regards,
Yihui
--
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]]
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:
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
2008 Mar 04
0
R2HTML - align a table from summary.lm
Hi all,
I use the R2HTML package to print results, but I have a little problem when
I want to print a table provides from a summary.lm.
If I want to align this table differently of the others, I use the "align"
argument ("left", "center or "right") of the HTML function , but it prints
"Coefficients left" (or "Coefficients center",