Displaying 20 results from an estimated 60 matches for "soutput".
Did you mean:
output
2012 Jan 19
2
Sweave question - Setting Soutput code chunks to stay inside page margins?
...two cases this happens in the resulting .tex file (one is a "hard"
case, and the other is simpler)
\begin{Schunk}
\begin{Sinput}
> print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
\end{Sinput}
\begin{Soutput}
[1] "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
\end{Soutput}
\end{Schunk}
\begin{Schunk}
\begin{Soutput}
Some Table
Model 1: SCIM_2_total ~ (I(AMS_2_total^3) + I(AMS_2_total^2) +
AMS_2_total) + fox
Model 2: SC...
2008 Jul 27
2
Colors in Sweave
...ks. For instance, in my .Rnw preample I tried including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}
\DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom={\color{darkred}}}
\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl,formatcom={\color{blue}}}
===
which works in the sense that colors do show up in the processed pdf document, but extra spaces in between the input and output code chunks appear (which is not the case w...
2005 Aug 05
3
Latex error with Sweave example
I created a tex file following the example in the Sweave help which
produced the following files in my working directory.
Sweave-test-1-006.eps
Sweave-test-1-006.pdf
Sweave-test-1-007.eps
Sweave-test-1-007.pdf
Sweave-test-1.tex
When I run latex on this, I get a latex error, log file below. I am
running R 2.1.1 on Windows XP. I have installed "small MiKTeX" and I
have added
2005 Nov 23
2
Really supress output from Sweave
...ls().
Attaching package: 'Hmisc'
The following object(s) are masked from package:gdata :
reorder.factor
The following object(s) are masked from package:car :
recode
The following object(s) are masked from package:stats :
ecdf
\end{Soutput}
\begin{Soutput}
Loading required package: class
Attaching package: 'e1071'
The following object(s) are masked from package:Hmisc :
impute
The following object(s) are masked from package:gtools :
permutations
The following object(s) are mas...
2004 Jan 08
2
Sweave & xtable
...n the myfile.dvi. Turning echo off, I
get the xtable code (not the nicely formated latex table) back in the
dvi.
There seems nothing wrong with the myfile.tex file itself. (I attach a
snip below). Everything run fine if I manually edit the myfile.tex file
and delete the :
\begin{Schunk}
\begin{Soutput}
and,
\end{Soutput}
\end{Schunk}
commands. Dropping these, I get the properly formated latex table in
the dvi.
I see that others have used xtable, so I assume Sweave.sty handle xtable
ok.
What am I missing?
code and output chunks follow....
===snip=====
n<- xtable(final[,1:3])
@
\begi...
2005 Jan 02
2
How to quieten axis() for Sweave: avoid echoing NULL?
...I'm using Sweave to produce reports. The reports require the "axis"
command. When I run axis the program returns NULL as well as creating
the axis.
> plot(1:4, rnorm(4), axes=FALSE)
> axis(1, 1:4, LETTERS[1:4])
NULL
>
So, my Sweave tex files have
\begin{Schunk}
\begin{Soutput}
NULL
\end{Soutput}
\end{Schunk}
in front of each graphic that requires axis. I can easily find them
and remove them, but I was wondering: is it something I can avoid? Or
am I doing something foolish and obvious?
Thanks for any assistance,
Andrew
--
Andrew Robinson Ph: 20...
2011 Mar 07
2
Sweave with scan()-ed data
...^
Is there some switch or option for Sweave that will make this work?
Below is the slide in question in an executable example:
\documentclass[dvipsnames,pdflatex,compress,beamer]{beamer}
\usepackage{Sweave}
\definecolor{Sinput}{rgb}{1,0,0}
\definecolor{Scode}{rgb}{0,0,0.56}
\definecolor{Soutput}{rgb}{0,0,1}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom={\color{Sinput}},fontsize=\footnotesize,baselinestretch=0.9}
\DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom={\color{Soutput}},fontsize=\footnotesize,baselinestretch=0.85}
\DefineVerbatimEnvironment{Scode}{Verbatim}{formatc...
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}
2008 Jun 17
3
Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
...R-mode; -*-
\documentclass[a4paper]{article}
\title{A Test File}
\author{Friedrich Leisch}
\usepackage{a4wide}
\usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
\begin{document}
\maketitle
A simple example that will run in any S engine: The integers from 1 to
10 are
\begin{Schunk}
\begin{Soutput}
[1] 1 2 3 4 5 6 7 8 9 10
\end{Soutput}
\end{Schunk}
We can also emulate a simple calculator:
?etc.
----------------------------------------------------------
When I run this file Latex ? Pdf using MikTeX 2.7 and TeXnicCenter I
get an error message. I know that it has something to do wi...
2005 Sep 08
1
Setting width in batch mode
...medianpop=median(state.pop))
@
----------------------------------------------------------------------
bug.tex
\begin{Schunk}
\begin{Sinput}
> options(width = 55)
> data(state)
> data.frame(area = mean(state.area), pop = mean(state.pop),
+ hop = mean(state.area))
\end{Sinput}
\begin{Soutput}
area pop hop
1 72367.98 4246420 72367.98
\end{Soutput}
\begin{Sinput}
> c(medianarea = median(state.area), medianpop = median(state.pop))
\end{Sinput}
\begin{Soutput}
medianarea medianpop
56222 2838500
\end{Soutput}
\begin{Sinput}
> c(medianarea = median(median(st...
2004 Dec 20
3
Sweave and LaTeX beamer class
...ow is the error code:
#################################
loading : Context Support Macros / PDF (2004.10.26)
) (d:\programme\texmf\tex\latex\hyperref\nameref.sty) (testset.out)
(testset.out) (testset.nav)
(d:\programme\texmf\tex\latex\ae\t1aett.fd)
Runaway argument?
> 1 + 1 \end {Sinput} \begin {Soutput} [1] 2 \end {Soutput} \end
{Sch\ETC.
! Paragraph ended before \FV at BeginScanning was complete.
<to be read again>
\par
l.26 }
? x
No pages of output.
Transcript written on testset.log.
#################################
Thanks in advance,
Bernd
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
...seline.2.11.tex baseline.devel.tex
gives:
--- baseline.2.11.tex 2010-10-05 11:33:49.000000000 +0200
+++ baseline.devel.tex 2010-10-05 11:33:49.000000000 +0200
@@ -83,7 +83,7 @@
\verb+\SweaveOpts{keep.source = TRUE}+
\begin{Schunk}
\begin{Sinput}
-> 12
+> line 54
\end{Sinput}
\begin{Soutput}
[1] 12
@@ -106,7 +106,7 @@
line 63 chunk option keep.source = TRUE
\begin{Schunk}
\begin{Sinput}
-> 14
+> line 67
\end{Sinput}
\begin{Soutput}
[1] 14
I used yesterday's R-beta, and my system is Ubuntu 9.10 64 bit (though that
probably doesn't matter).
Building the ex...
2012 Aug 21
2
Sweave: R chunk inside caption?
...thor {me}
\usepackage{Sweave}
\begin {document}
\maketitle
\DeclareGraphicsExtensions{.pdf,.png}
\begin {figure}
\includegraphics{test-fig1}
\caption {
This is the caption with some r-code
\begin{Schunk}
\begin{Sinput}
> 2*2
\end{Sinput}
\begin{Soutput}
[1] 4
\end{Soutput}
\end{Schunk}
}
\label {fig:1}
\end {figure}
\end{document}
2004 Jul 05
1
Apparent conflict between \Sexpr in Sweave and R2HTML
...The Sweave output file, Sweave-test-1_short.tex:
% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
\documentclass{article}
\title{A Test File}
\author{Friedrich Leisch}
\usepackage{/usr/lib/R/share/texmf/Sweave}
\begin{document}
\maketitle
Now we look at Gaussian data:
\begin{Schunk}
\begin{Soutput}
[1] -1.80980347 1.41215325 -0.01118795 1.69149919 0.04621916 0.43672840
[7] 0.05831105 1.26632742 0.41980267 -0.45035200 -0.73382409 -0.92390546
[13] 0.28338334 -0.05982873 -0.15500443 -2.43182528 -0.69751187 -0.30238204
[19] 0.99555389 -1.80047878
\end{Soutput}
\begin{Soutput}
One Sam...
2010 Sep 30
2
Sweave and LaTeX beamer class
...e]
In the year \uncover<2->{25}\uncover<3->{\Sexpr{5*5}}
\uncover<4->{
<<echo=TRUE, print=TRUE>>=
5*5*101
@
}
\end{frame}
\end{document}
leads to an error message when running pdflatex over the *.tex file:
[...]
! FancyVerb Error:
Extraneous input ` 2525 \end {Soutput} \end {Schunk} \beamer at endcovered ' bet
ween \begin{Soutput}[<key=value>] and line end
.
\FV at Error ... {FancyVerb Error:
\space \space #1
}
--
Johannes H?sing There is something fascinating about science.
One gets such wholesale re...
2008 Feb 27
2
Sweave produces gibberish instead of apostrophe in pdf
...gin{document}
\begin{Schunk}
\begin{Sinput}
> n <- 50
> x <- seq(1, n)
> a.true <- 3
> b.true <- 1.5
> y.true <- a.true + b.true * x
> s.true <- 17.3
> y <- y.true + s.true * rnorm(n)
> out1 <- lm(y ~ x)
> summary(out1)
\end{Sinput}
\begin{Soutput}
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-31.9565 -9.4745 -0.1708 7.3759 44.6538
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.07386 4.64712 -0.016 0.987
x 1.57405 0.15860 9.924 3.25e-13 ***
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 .? 0.1 ? ? 1...
2008 Feb 25
3
How to include the documentation of a function in a Sweave document?
...form (session info at the end):
-------- tmp.tex --------
\documentclass{article}
\usepackage{/Library/Frameworks/R.framework/Resources/share/texmf/Sweave}
\begin{document}
\begin{Schunk}
\begin{Sinput}
> `?`(plot)
\end{Sinput}
\end{Schunk}
\end{document}
-------- tmp.tex --------
in which no Soutput has been generated. Is it possible to redirect the
help output, in a platform-independent way, so that it is included in
the Soutput environment of the LaTeX file?
Best,
Jean
> sessionInfo()
R version 2.6.2 (2008-02-08)
i386-apple-darwin8.10.1
locale:
C
attached base packages:
[1] stats...
2009 Dec 22
1
Sweave: font problems with Signif. codes lines
[Environment: Win Xp, Miktex 2.7, R 2.9.2]
In an Sweave document, I'm displaying the results of car:::Anova()
tests, that look like this in the
generated .tex file:
\begin{Soutput}
Type III MANOVA Tests: Pillai test statistic
Df test stat approx F num Df den Df Pr(>F)
(Intercept) 1 0.86 90.38 4 60 <2e-16 ***
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
\end{Soutput}
When processed with pdfLaTeX, using
\usepackage{Sweave}
the Signif. codes lines ap...
2009 Oct 13
2
Sweave output encoding in R-2.10.0beta on Windows (Rgui <-> Rterm)
...german umlaute (latin1-encoded) is again latin1-encoded (the resulting
.tex-file compiles with \usepackage[latin1]{inputenc} and
\usepackage[german]{babel}).
In R-2.10.0beta, however, when invoking R via Rgui --vanilla (output of
seesionInfo() below), some of Sweave's output (more precisely, Soutput
environments containing german umlaute, Sinput environments with german
umlaute are still latin1) is utf-8 encoded (with some extra characters
at the start and the end, which could be BOMs). Surprisingly, when R is
invoked from (Windows) command line (R --vanilla or Rterm --vanilla),
the encod...
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all,
I am using Sweave to produce a document. Unfortunately, I have to print
several copies and I can't print them in color. So I would like to
change the way of printing the code. I would like to print the code in a
box with a black borderline and a grey background (quite classic). Is it
possible to do it by changing some Schunk options?
Christophe