Displaying 20 results from an estimated 200 matches similar to: "Combining Sweave and fancyvrb"
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks,
When I run the document below through sweave, rgui.exe/rsession.exe
leaves a file handle open to the sweave-001.pdf graphic (as verified by
process explorer). Pdflatex.exe then crashes (with a Permission Denied
error) because the graphic file is locked.
This only seems to happen when there is an error in the sweave document.
When there are no errors, no file handles are left open.
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
Dear Colleagues:
In an attempt to have things like # See page \pageref{this} inside
comments in R code chunks I have modified Sweave.sty as below. I have
followed fancyvrb's manual with regard to the use of the commandchars
argument. But when compiling with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname
2012 Mar 25
2
avoiding for loops
I have data that looks like this:
> df1
group id
1 red A
2 red B
3 red C
4 blue D
5 blue E
6 blue F
I want a list of the groups containing vectors with the ids. I am
avoiding subset(), as it is
only recommended for interactive use. Here's what I have so far:
df1 <- data.frame(group=c("red", "red", "red", "blue",
2008 Jul 27
2
Colors in Sweave
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. 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}}}
2010 Sep 24
1
tamaño de letra en Sweave
Hola a todos.
Estoy utilizando Sweave para integrar mis análisis en documentos de
latex. Alguien sabe como cambiar el tamaño de letra por defecto para el
código y las salidas de R. Supongo que será especificando algo en el
preámbulo, pero no sé como.
Gracias.
[[alternative HTML version deleted]]
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
2005 Mar 18
4
Sweave/margin
Hi!
I am currently using Sweave for writing my bachelor thesis - and I have a
problem:
I am using a LaTeX style (report) with quite big margin spaces. The Sweave
generated LaTeX code "floats" into the margin - and it looks ugly. The text
is blocked and fine... then there comes some flattering code running over
the margin... and blocked text again.
Considering the LaTeX output, I guess
2012 May 25
1
knitr customization
I am trying to transition from Sweave to knitr, but there are a few
things about customization of the appearence of R input and output that
I did not get yet. Maybe somebody on the list can help me.
In my Sweave presentations I used a slanted font for the R input and a
normal font for the output, both in a small font. I also indented
everything by an extra 2em. All this was achieved by the
2009 Apr 16
2
there are fontencoding problem in Sweave
I want write article by russian language using Sweave. For cyrillic text
LaTeX use T2A encoding
\usepackage[T2A]{fontenc}
But in Sweave.sty we find:
\RequirePackage[T1]{fontenc}
It is source of critical problem.
For example Rnw file
$ cat estimation.Rnw
\documentclass[A4paper]{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
2004 Feb 19
1
latex problem with Sweave output file under Debian
Could someone tell me how to end the trouble I'm encountering when
running latex on the .tex file produced by Sweave()? Sweave() seems to
process the example file
(http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw) without
problems, and the file example-1.tex produced is the same as in the Sweave
manual. However, when I run latex on example-1.tex, many error messages
and requests for
2010 Aug 10
1
Sweave with dev.new()
Dear list.
I am preparing a R package, and the last step is to write a package
vignette using Sweave. However, I am experiencing some trouble when trying
to include plots in my Sweave document. That is, in my package I have made
some plotting functions in which I start by calling 'new.dev()' to start a
graphics device of a certain width and height, and then proceed with
plot(). These
2011 Mar 07
2
Sweave with scan()-ed data
In an Sweave slide, I want to use sem::read.moments() and
sem::specify.model(), which work
by using scan() to read the following lines, up to the first blank
line. However, Sweave
throws an error:
> Sweave("sem-thurstone.Rnw")
Writing to file sem-thurstone.tex
Processing code chunks ...
1 : term hide (label=arrests-setup)
2 : echo term hide (label=thurstone-data)
Error:
2016 Jul 29
2
strange behavior in 'inherits' check for loaded S4 object
I should add one more item that may be related here -- calling
'methods:::.requirePackage' returns a different result based on
whether the package namespace is already loaded or not.
If the package namespace is not loaded, the package is loaded and
attached, and the package environment is returned:
> methods:::.requirePackage("digest")
Loading required package:
2016 Jul 31
2
strange behavior in 'inherits' check for loaded S4 object
(Just returning from the "wilds" of Canada, so not able to comment on the specifics, but ...)
There is a basic point about generic functions that may be related to the "private" class question and my earlier remarks that Martin alluded to.
R (and S4 before it) allows packages to define methods for a generic function in another package. Say, for plot() in graphics.
The
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
Hello,
This problem originally surfaced as an interaction between 'brms',
'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
an object of an S4 class owned by the 'rstan' package tried to load its
namespace. rstan:::.onLoad needs to load Rcpp modules, which uses load
actions and reference classes. Since methods:::.findInheritedMethods
2005 Jan 06
2
autoscaling plot font size in Sweave output possible?
Hi,
I was wondering if it's possible to have fonts in plots to be
autoscaled to the same font size used by LaTeX in a surrounding
Sweave document.
Here's a short example in which the fonts of the first plot are
barely readable:
--8<------------------------schnipp------------------------->8---
\documentclass{article}
\usepackage{graphicx}
\newcommand{\mytext}{Some normal sized
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
>>>>> Ivan Krylov via R-devel
>>>>> on Fri, 27 Sep 2024 13:32:27 +0300 writes:
> Hello,
> This problem originally surfaced as an interaction between 'brms',
> 'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
> an object of an S4 class owned by the 'rstan' package tried to
2011 Apr 15
1
Sweave and Slides (Beamer)
I'm posting this for two reasons: one is to see if anyone has a better
way of solving the problem or suggestions for improving my existing
approach; and the other is to show what I'm currently doing in case
anyone else might find it useful.
The background is that I've been using Sweave for several years now to
produce class notes, and I sometimes include quite a lot of raw R input
and
2002 Nov 13
1
Package documentation and rd.sty
Hi all,
I've got a basic question regarding package documentation and rd.sty. I
wrote my first own package, and now I would like to place the documentation
into the appendix of another LaTex document. Seemingly I cannot simply
\usepackage{Rd}, as this will modify the page-settings of my document. Is
there a minimum style file which will just define the environments and
commands needed for
2018 Nov 03
1
odd NOTE in R CMD check of data; Rcpp module related
With the current version of the "raster" package (that I maintain), R CMD
check on packages "soilDB" and "PopGenReport" have this NOTE:
Package: soilDB
Check: data for non-ASCII characters
New result: NOTE
Error in .requirePackage(package) :
unable to find required package 'raster'
Calls: <Anonymous> ... .findInheritedMethods ->