Re: [R] Sweave

2022-06-26 Thread R. Mark Sharp via R-help
Naresh, First of all thanks for using reporoducible methods. I now use knitr instead of Sweave and the switch was fairly trivial. What you are wanting to do has been supported for a few years within RStudio. I found https://support.rstudio.com/hc/en-us/articles/200552336-Getting-Help-with-R

[R] Sweave and optional document sections

2017-01-26 Thread Kyle Covington
I was just trying to do this and I think I have a reasonable solution that seems to be working well. In the main document you can include a chunk with a logical section: <>= if(T){ {sink("/dev/null"); Sweave(’subsection.Rnw'); sink(); } cat('\\input{subsection.tex}') } @ Then you can put y

Re: [R] Sweave: Incorporating warnings into a Sweave output chunck

2017-01-04 Thread Duncan Mackay
, 5 January 2017 07:06 To: Duncan Mackay Cc: R Subject: Re: [R] Sweave: Incorporating warnings into a Sweave output chunck Dear Duncan, I'd recommend to switch from Sweave to knitr. Knitr has more options for handling warnings and errors than Sweave. Best regards, ir. Th

Re: [R] Sweave: Incorporating warnings into a Sweave output chunck

2017-01-04 Thread Thierry Onkelinx
one it manually which is a bit of a pain. > > Does anyone know of a way? It would be nice to have a Sweave option to > include it. > > The only reference I can find is > > https://stat.ethz.ch/pipermail/r-help/2006-December/121892.html > > which had no replies excep

[R] Sweave: Incorporating warnings into a Sweave output chunck

2017-01-03 Thread Duncan Mackay
http://r.789695.n4.nabble.com/R-Sweave-and-warning-messages-td814182.html I have got the code from the attached Rnw file working in R version 3.3.1 But there are some problems with it. Below is the code including some of the options and setup with the function in one chunck <>= option

Re: [R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Duncan Murdoch
On 04/07/2016 7:42 AM, Christian Hoffmann wrote: Hi, I have a *.Rnw which I can Sweave with no problem, but which cannot be processed by R CMD Rd2pdf --no-clean --force. That's not the command you're using. (It would give a "no inputs" error, not a vignette error. If you actually gave the

Re: [R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Rolf Turner
Perhaps this is just my ignorance speaking, but it seems counterintuitive to me to try to process a *.Rnw file by means of Rd2pdf which would appear to be designed to process *.Rd files. I would have thought that "R CMD Sweave ..." would be the appropriate call. I find that R CMD Swe

[R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Christian Hoffmann
Hi, I have a *.Rnw which I can Sweave with no problem, but which cannot be processed by R CMD Rd2pdf --no-clean --force. Th latter stops with creating vignettes ... ERROR Error: processing vignette 'cwhmisc.Rnw' failed with diagnostics: at cwhmisc.Rnw:31, could not find function "cformat" E

Re: [R] SWEAVE - a gentle introduction

2015-11-18 Thread John Maindonald
r-help-requ...@r-project.org<mailto:r-help-requ...@r-project.org> wrote: From: Duncan Murdoch mailto:murdoch.dun...@gmail.com>> Subject: Re: [R] SWEAVE - a gentle introduction Date: 18 November 2015 08:09:34 NZDT To: Marc Schwartz mailto:marc_schwa...@me.com>>,

Re: [R] SWEAVE - a gentle introduction

2015-11-18 Thread Greg Snow
John, One additional point that I have not seen brought up yet. If your main goal is to have all the output from an existing R script put into a single output file then you should look at the `stitch` function in the knitr package. This will take an existing R script and convert it to one of the

Re: [R] SWEAVE - a gentle introduction

2015-11-18 Thread Therneau, Terry M., Ph.D.
As a digest reader I am late to the discussion, but let me toss in 2 further notes. 1. Three advantages of knitr over Sweave a. The book "Dynamic documents with R and knitr". It is well written; sitting down for an evening with the first half (70 pages) is a pretty good way to learn the pack

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Duncan Murdoch
On 17/11/2015 6:56 PM, Henrik Bengtsson wrote: When choosing source format, it's probably helpful to know that if you work with a Markdown-based format (e.g. Rmarkdown) you'll be able to generate either/both HTML or/and PDF documents, whereas if you work with LaTeX-based formats (e.g. Sweave/knit

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Henrik Bengtsson
When choosing source format, it's probably helpful to know that if you work with a Markdown-based format (e.g. Rmarkdown) you'll be able to generate either/both HTML or/and PDF documents, whereas if you work with LaTeX-based formats (e.g. Sweave/knitr) you will only be able output PDF documents (at

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Duncan Murdoch
On 17/11/2015 10:42 AM, Marc Schwartz wrote: On Nov 17, 2015, at 9:21 AM, John Sorkin wrote: I am looking for a gentle introduction to SWEAVE, and would appreciate recommendations. I have an R program that I want to run and have the output and plots in one document. I believe this can be ac

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread John Kane
I've been very pleased using knitr in combination with LyX for pdf production. John Kane Kingston ON Canada > -Original Message- > From: jsor...@grecc.umaryland.edu > Sent: Tue, 17 Nov 2015 10:21:15 -0500 > To: r-help@r-project.org > Subject: [R] SWEAVE - a gentle

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Thierry Onkelinx
Given that you like a gentle introduction and don't know HTML, I would recommend rmarkdown in combination with knitr. See http://rmarkdown.rstudio.com/ for a lot of information. I find knitr more flexible than sweave. Markdown syntax is much easier than HTML or latex. Best regards, Thierry Op 17

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Ista Zahn
I suggest using knitr instead of sweave. There are plenty of tutorials online; http://jeromyanglim.blogspot.co.nz/2012/05/getting-started-with-r-markdown-knitr.html?m=1 might be a good place to start. Links to a full length book and other resources are available at http://yihui.name/knitr/ Best,

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Marc Schwartz
> On Nov 17, 2015, at 9:21 AM, John Sorkin wrote: > > I am looking for a gentle introduction to SWEAVE, and would appreciate > recommendations. > I have an R program that I want to run and have the output and plots in one > document. I believe this can be accomplished with SWEAVE. Unfortunate

[R] SWEAVE - a gentle introduction

2015-11-17 Thread John Sorkin
I am looking for a gentle introduction to SWEAVE, and would appreciate recommendations. I have an R program that I want to run and have the output and plots in one document. I believe this can be accomplished with SWEAVE. Unfortunately I don't know HTML, but am willing to learn. . . as I said I

Re: [R] sweave package for R version 3.02

2014-11-11 Thread Frederic Ntirenganya
I got it. I should use compile not run option. Thanks All. Frederic Ntirenganya Maseno University, African Maths Initiative, Kenya. Mobile:(+254)718492836 Email: fr...@aims.ac.za https://sites.google.com/a/aims.ac.za/fredo/ On Tue, Nov 11, 2014 at 4:08 PM, Frederic Ntirenganya wrote: > Thanks

Re: [R] sweave package for R version 3.02

2014-11-11 Thread Frederic Ntirenganya
Thanks all for the help. Now I want to use it and I am getting this error: > \documentclass[9pt,a4paper]{article} Error: unexpected input in "\" > \usepackage{amsmath} Error: unexpected input in "\" > \usepackage{booktabs} Error: unexpected input in "\" > \usepackage{adjustbox} Error: unexpected

Re: [R] sweave package for R version 3.02

2014-11-11 Thread Duncan Murdoch
On 11/11/2014, 6:25 AM, Frederic Ntirenganya wrote: > Hi All, > > I would like to install the package "sweave" but got the following warning: > >> install.packages("sweave") > Installing package into ‘/home/fredo/R/x86_64-pc-linux-gnu-library/3.0’ > (as ‘lib’ is unspecified) > Warning in install.

Re: [R] sweave package for R version 3.02

2014-11-11 Thread Marc Schwartz
> On Nov 11, 2014, at 5:25 AM, Frederic Ntirenganya wrote: > > Hi All, > > I would like to install the package "sweave" but got the following warning: > >> install.packages("sweave") > Installing package into ‘/home/fredo/R/x86_64-pc-linux-gnu-library/3.0’ > (as ‘lib’ is unspecified) > Warning

[R] sweave package for R version 3.02

2014-11-11 Thread Frederic Ntirenganya
Hi All, I would like to install the package "sweave" but got the following warning: > install.packages("sweave") Installing package into ‘/home/fredo/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘sweave’ is not available (for R version 3.0.2

Re: [R] [Sweave] doesn't accept unicode?

2014-10-22 Thread moonkid
Maybe your answers are solutions, but not in my case. As I indicated with my code-sample I don't have a complete tex-file (with usepackage, document-env, etc). I only generate a piece of a tex file to \input it later in my puplication tex-file. So there is no way to specifiy an encoding with a

Re: [R] [Sweave] doesn't accept unicode?

2014-10-21 Thread Yihui Xie
2:45, moon...@posteo.org a écrit : > >> Of course I manage and write my tex-files in unicode (utf-8) (running >> XeTeX). That is why my R-output need to be in unicode, too. >> >> But Sweave doesn't accept unicode files. >> >> [R] >>> >>> Swea

Re: [R] [Sweave] doesn't accept unicode?

2014-10-21 Thread Marc Girondot
) (running XeTeX). That is why my R-output need to be in unicode, too. But Sweave doesn't accept unicode files. [R] Sweave("analy.Snw") Fehler: ‘analy.Snw’ is not ASCII and does not declare an encoding [/R] [analy.Snw] <<>>= x <- ü table(x) @ [/analy.Snw] How sho

[R] [Sweave] doesn't accept unicode?

2014-10-21 Thread moonkid
Of course I manage and write my tex-files in unicode (utf-8) (running XeTeX). That is why my R-output need to be in unicode, too. But Sweave doesn't accept unicode files. [R] Sweave("analy.Snw") Fehler: ‘analy.Snw’ is not ASCII and does not declare an encoding [/R] [analy.Sn

Re: [R] Sweave files into LaTex

2014-04-07 Thread Axel Urbiz
Thanks Michael. That worked perfect! Best Axel. On Sat, Apr 5, 2014 at 2:13 PM, Michael Friendly wrote: > If you use knitr, you can do, in master.Rnw > > <>= > @ > This is the equivalent of \input{} (but not \include{}) at the .Rnw level. > > At any rate, if you have more than just a few code

Re: [R] Sweave files into LaTex

2014-04-05 Thread Michael Friendly
If you use knitr, you can do, in master.Rnw <>= @ This is the equivalent of \input{} (but not \include{}) at the .Rnw level. At any rate, if you have more than just a few code chunks, you should do your work in master.Rnw and produce master.tex from that using either sweave() or knitr() -M On

Re: [R] Sweave files into LaTex

2014-04-04 Thread Duncan Murdoch
On 04/04/2014, 7:10 PM, Axel Urbiz wrote: Hi, I'm writing a thesis in Latex (say master.tex). I'd like to include R code/results from an .Rwd file. I've naively tried: 1) Add ONLY the code below in Rcode.Rnw file: \section{Exploratory data analysis} <>= library(ggplot2) data(diamonds) head(dia

[R] Sweave files into LaTex

2014-04-04 Thread Axel Urbiz
Hi, I'm writing a thesis in Latex (say master.tex). I'd like to include R code/results from an .Rwd file. I've naively tried: 1) Add ONLY the code below in Rcode.Rnw file: \section{Exploratory data analysis} <>= library(ggplot2) data(diamonds) head(diamonds) @ 2) Then, in the master.tex file ad

Re: [R] Sweave: cat() in a chunk with option results=texdoesn'tproducelinebreaksatthe end of a character string anymore

2014-03-05 Thread Gerrit Eichner
Thanks, Duncan, I got it! I missread/-understood strip.white's meaning and thought it would refer only to blank lines within "real" code chunks (i.e., to those between \begin{Schunk} and \end{Schunk}), but not to the (TeX-)output which was generated by code chunks with results=tex. My goal:

Re: [R] Sweave: cat() in a chunk with option results=texdoesn'tproducelinebreaks at the end of a character string anymore

2014-03-05 Thread Duncan Murdoch
On 05/03/2014 9:29 AM, Gerrit Eichner wrote: Thanks, Duncan, but, sorry, including \SweaveOpts{strip.white=true} doesn't help. Have tried that before and forgot to mention; sorry! true is the default. You want false. Duncan Murdoch BTW: using \SweaveOpts{strip.white="true"}, i.e., with

Re: [R] Sweave: cat() in a chunk with option results=texdoesn'tproducelinebreaks at the end of a character string anymore

2014-03-05 Thread Gerrit Eichner
Thanks, Duncan, but, sorry, including \SweaveOpts{strip.white=true} doesn't help. Have tried that before and forgot to mention; sorry! BTW: using \SweaveOpts{strip.white="true"}, i.e., with quotation marks as requested in RweaveLatex()'s help file, throws out Error in match.arg(options$stri

Re: [R] Sweave: cat() in a chunk with option results=tex doesn't producelinebreaks at the end of a character string anymore

2014-03-05 Thread Duncan Murdoch
On 05/03/2014 7:32 AM, Gerrit Eichner wrote: Hello, everyone, I am struggling with an Sweave-problem that didn't occur sofar (and I have no clue what I might have changed in my system; see below). The following example *.Rnw file's only task is (for simplicity) to output text with a little bit o

[R] Sweave: cat() in a chunk with option results=tex doesn't producelinebreaks at the end of a character string anymore

2014-03-05 Thread Gerrit Eichner
Hello, everyone, I am struggling with an Sweave-problem that didn't occur sofar (and I have no clue what I might have changed in my system; see below). The following example *.Rnw file's only task is (for simplicity) to output text with a little bit of TeX-code with linebreaks (e. g., to be be

[R] freetype 2.5.1 and mono 3.2.5 (was Re: new bugs and new bundles Re: [Rd] R/Sweave/cairo/freetype bug fix.)

2013-11-26 Thread Hin-Tak Leung
The freetype people fixed the 2nd set of issues with system fonts shipped with Mac OS X, and released 2.5.1 almost immediately after that. So there are new bundles under http://sourceforge.net/projects/outmodedbonsai/files/R/ . Just a reminder that the official R binaries for windows/mac OS X ar

[R] new bugs and new bundles Re: [Rd] R/Sweave/cairo/freetype bug fix.

2013-09-03 Thread Hin-Tak Leung
sure what the issue is. Something with bold Chinese fonts in X11, but maybe also affecting Latin fonts, ? Please explain yourself. -pd On Mar 30, 2013, at 09:25 , Hin-Tak Leung wrote: The problem was first seen with R/Sweave (#c0) then reproduced directly with cairo (#

Re: [R] Sweave: printing an underscore in the output from an R command

2013-09-02 Thread Yihui Xie
> I tried the previous version as follows in my .Rnw document > \Sexpr{print(sub("_", "_", version$platform))} > When Sweave is run, this expression is evaluated to illegal LaTeX > > David. > > > > > On 2 Sep 2013, at 16:47, ONKELINX, Thierry wrote: > >>

Re: [R] Sweave: printing an underscore in the output from an R command

2013-09-02 Thread Duncan Murdoch
On 13-09-02 3:18 PM, David Epstein wrote: Dear Thierry, Your suggestion doesn't work on my version of R. Here's what I get gsub("_", "\_", print(version$platform) Error: '\_' is an unrecognized escape in character string starting ""\_" print(gsub("_", "\_", version$platform)) Error: '\_' is

Re: [R] Sweave: printing an underscore in the output from an R command

2013-09-02 Thread David Epstein
ot;, version$platform))} When Sweave is run, this expression is evaluated to illegal LaTeX David. On 2 Sep 2013, at 16:47, ONKELINX, Thierry wrote: > You have to escape the underscore > > \Sexpr{gsub("_", "\_", print(version$platform))} > > Best regards,

Re: [R] Sweave: printing an underscore in the output from an R command

2013-09-02 Thread ONKELINX, Thierry
maandag 2 september 2013 17:38 Aan: r-help@r-project.org Onderwerp: [R] Sweave: printing an underscore in the output from an R command I am working with Sweave and would like to print out into my latex document the result of the R command version$platform So what I first tried in my .Rnw docum

[R] Sweave: printing an underscore in the output from an R command

2013-09-02 Thread David Epstein
I am working with Sweave and would like to print out into my latex document the result of the R command version$platform So what I first tried in my .Rnw document was \Sexpr{print(version$platform)}. However, the output from this command is the string "x86_64-apple-darwin10.8.0" (without the quo

Re: [R] new window cairo bundle Re: [Rd] R/Sweave/cairo/freetype bug fix.

2013-06-13 Thread Hin-Tak Leung
m. > > > > > > > >Thanks, > > > >SImon > > > > > > > > > > > > > > > >> --- On Sat, 30/3/13, peter dalgaard > > > > wrote: > > > >> > > > >>

[R] new window cairo bundle Re: [Rd] R/Sweave/cairo/freetype bug fix.

2013-04-02 Thread Hin-Tak Leung
> >> Huh? > > >> > > >> This is utterly incomprehensible without > reading > > the redhat > > >> bugzilla, and even after reading, I'm not sure > what > > the > > >> issue is. Something with bold Chinese f

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-04-01 Thread Hin-Tak Leung
redhat > >> bugzilla, and even after reading, I'm not sure what > the > >> issue is. Something with bold Chinese fonts in X11, > but > >> maybe also affecting Latin fonts, ? > >> > >> Please explain yourself. > >> > >>

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-04-01 Thread Simon Urbanek
utterly incomprehensible without reading >> the redhat >>>> bugzilla, and even after reading, I'm not sure what >> the >>>> issue is. Something with bold Chinese fonts in X11, >> but >>>> maybe also affecting Latin fonts, ? &g

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-03-30 Thread Hin-Tak Leung
> bugzilla, and even after reading, I'm not sure what the >> issue is. Something with bold Chinese fonts in X11, but >> maybe also affecting Latin fonts, ? >> >> Please explain yourself. >> >> -pd >> >> On Mar 30, 2013, at 09:25 , Hin-Tak Le

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-03-30 Thread Simon Urbanek
rehensible without reading the redhat >> bugzilla, and even after reading, I'm not sure what the >> issue is. Something with bold Chinese fonts in X11, but >> maybe also affecting Latin fonts, ? >> >> Please explain yourself. >> >> -pd >> >

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-03-30 Thread Hin-Tak Leung
-pd > > On Mar 30, 2013, at 09:25 , Hin-Tak Leung wrote: > > > The problem was first seen with R/Sweave (#c0) then > reproduced directly with cairo (#c10) and was eventually > traced to freetype. The 5-part bug fix: > > 610ee58e07090

Re: [R] [Rd] R/Sweave/cairo/freetype bug fix.

2013-03-30 Thread peter dalgaard
Leung wrote: > The problem was first seen with R/Sweave (#c0) then reproduced directly with > cairo (#c10) and was eventually traced to freetype. The 5-part bug fix: > 610ee58e07090ead529849b2a454bb6c503b4995 > da11e5e7647b668dee46fd0418ea5ecbc33ae3b2 > e1a2ac1900f2f16ec48f

[R] R/Sweave/cairo/freetype bug fix.

2013-03-30 Thread Hin-Tak Leung
The problem was first seen with R/Sweave (#c0) then reproduced directly with cairo (#c10) and was eventually traced to freetype. The 5-part bug fix: 610ee58e07090ead529849b2a454bb6c503b4995 da11e5e7647b668dee46fd0418ea5ecbc33ae3b2 e1a2ac1900f2f16ec48fb4840a6b7965a8373c2b

Re: [R] sweave question

2013-02-14 Thread Duncan Mackay
Hi Mark I need pdfs for Sweave etc, my colleagues want wmfs or the ilk and for publishing eps/tiff so I just add a section for each with in the 'print' chunk Duncan At 02:49 15/02/2013, you wrote: Hi Dan, Duncan and Yihui: I apologize for my late response. Dan: Your backslash explanation

Re: [R] sweave question

2013-02-14 Thread Mark Leeds
Hi Dan, Duncan and Yihui: I apologize for my late response. Dan: Your backslash explanation was great but yes, I think there was a transmission problem in the link I sent. I made the changes and everything compiled without a glitch but the actual tex file ends up with many begin{Schunk} and end{Sc

Re: [R] sweave question

2013-02-13 Thread Yihui Xie
Other people in this thread have explained the rule of double backslashes. I just want to add one more comment: That clever solution was in 2009 when knitr has not come out, and I have used this picture several times to show how much I dislike it: http://yihui.name/en/2012/06/enjoyable-reproducibl

Re: [R] sweave question

2013-02-13 Thread Daniel Nordlund
und Bothell, WA USA > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Mark Leeds > Sent: Wednesday, February 13, 2013 4:18 PM > To: Nordlund, Dan (DSHS/RDA) > Cc: r-help@r-project.org > Subject: Re: [R]

Re: [R] sweave question

2013-02-13 Thread Duncan Mackay
bruary 13, 2013 2:59 PM > To: r-help@r-project.org > Subject: [R] sweave question > > Hi Everyone: I was having trouble getting the plot size correct when > putting a plot in an sweave document. So, I searched on the internet > and I > found a clever solution where the person uses

Re: [R] sweave question

2013-02-13 Thread Mark Leeds
ednesday, February 13, 2013 2:59 PM > > To: r-help@r-project.org > > Subject: [R] sweave question > > > > Hi Everyone: I was having trouble getting the plot size correct when > > putting a plot in an sweave document. So, I searched on the internet > > and I >

Re: [R] sweave question

2013-02-13 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Mark Leeds > Sent: Wednesday, February 13, 2013 2:59 PM > To: r-help@r-project.org > Subject: [R] sweave question > > Hi Everyone: I was having troub

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Troy S
Duncan, Alas, I had left out the --pdf flag when I tried the solution. I am glad I have an answer now, and a better understanding of the problem. Troy On Wed, Jan 30, 2013 at 9:50 AM, Duncan Murdoch wrote: > On 13-01-30 11:00 AM, Troy S wrote: > >> Michael, >> >> I added C:\R\R-2.15.2\share\te

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Duncan Murdoch
On 13-01-30 11:00 AM, Troy S wrote: Michael, I added C:\R\R-2.15.2\share\texmf to the list of roots and hit apply and that solved the problem. Thanks! Duncan, I did try the R CMD Sweave you suggested and that did not solve the issue. The problem was in running LaTeX so how was your suggestio

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Troy S
Michael, I added C:\R\R-2.15.2\share\texmf to the list of roots and hit apply and that solved the problem. Thanks! Duncan, I did try the R CMD Sweave you suggested and that did not solve the issue. The problem was in running LaTeX so how was your suggestion help me? It would have to copy the

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Duncan Murdoch
On 13-01-30 8:52 AM, Michael Friendly wrote: On 1/29/2013 6:04 PM, Troy S wrote: Ok, yes I realize it. So let me try to fix it: I removed the sty files, and set TEXINPUTS to 'C:\R\R-2.15.2\share\texmf\tex\latex I am back where I started: the tex file will not process. Please let me know what I

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Michael Friendly
On 1/29/2013 6:04 PM, Troy S wrote: Ok, yes I realize it. So let me try to fix it: I removed the sty files, and set TEXINPUTS to 'C:\R\R-2.15.2\share\texmf\tex\latex I am back where I started: the tex file will not process. Please let me know what I should do to fix the issue. Troy Don't do t

Re: [R] Sweave files generating miktex errors

2013-01-30 Thread Duncan Murdoch
On 13-01-29 6:04 PM, Troy S wrote: Ok, yes I realize it. So let me try to fix it: I removed the sty files, and set TEXINPUTS to 'C:\R\R-2.15.2\share\texmf\tex\latex I am back where I started: the tex file will not process. Please let me know what I should do to fix the issue. Follow my advice

Re: [R] Sweave files generating miktex errors

2013-01-29 Thread Troy S
Ok, yes I realize it. So let me try to fix it: I removed the sty files, and set TEXINPUTS to 'C:\R\R-2.15.2\share\texmf\tex\latex I am back where I started: the tex file will not process. Please let me know what I should do to fix the issue. Troy On Tue, Jan 29, 2013 at 2:20 PM, Duncan Murdoch w

Re: [R] Sweave files generating miktex errors

2013-01-29 Thread Duncan Murdoch
On 13-01-29 4:55 PM, Troy S wrote: Duncan, Copying all 3 sty files to my working directory solved the problem. I'm still curious why this was necessary in my new install. Duncan, many thanks! You do realize that you have now done a Very Bad Thing, I hope. Duncan Murdoch Troy On Tue, Jan

Re: [R] Sweave files generating miktex errors

2013-01-29 Thread Troy S
Duncan, Copying all 3 sty files to my working directory solved the problem. I'm still curious why this was necessary in my new install. Duncan, many thanks! Troy On Tue, Jan 29, 2013 at 10:58 AM, Duncan Murdoch wrote: > On 29/01/2013 1:37 PM, Troy S wrote: > >> Dear useRs-- >> >> I have been u

Re: [R] Sweave files generating miktex errors

2013-01-29 Thread Duncan Murdoch
On 29/01/2013 1:37 PM, Troy S wrote: Dear useRs-- I have been using Sweave with miktex for years, but on a new install on Windows XP, miktex seems to be hung up on single quotes. See example below. Digging through stackexchange, I found using \usepackage[noae]{Sweave} in the tex file solved th

[R] Sweave files generating miktex errors

2013-01-29 Thread Troy S
Dear useRs-- I have been using Sweave with miktex for years, but on a new install on Windows XP, miktex seems to be hung up on single quotes. See example below. Digging through stackexchange, I found using \usepackage[noae]{Sweave} in the tex file solved the problem. My questions are: --Why wo

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-18 Thread Duncan Murdoch
On 13-01-17 6:33 PM, michele caseposta wrote: Hi, I just updated R and patchDVI (from CRAN). Now I can reverse search from the pdf to the included.Rnw. However, I cannot forward search from the included to the pdf. Is this how it is expected to work? I think it works if you use first line % !

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-17 Thread Yihui Xie
Sweave produces foo-concordance.tex from foo.Rnw, and writes \input{foo-concordance.tex} in the LaTeX output. You can turn on the concordance option in knitr as well. Since you do not use RStudio, you have a couple of more steps to go: 1. borrow \Sconcordance from Sweave.sty; 2. manually \input{fo

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-17 Thread huang min
Anybody know if it is possible to use texshop and knitr with the sync working? I add a knitr engine but cannot sync. PS, I am comfortable with texshop but not RStudio. Huang On Fri, Jan 18, 2013 at 7:33 AM, michele caseposta wrote: > Hi, > I just updated R and patchDVI (from CRAN). > Now I can

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-17 Thread michele caseposta
Hi, I just updated R and patchDVI (from CRAN). Now I can reverse search from the pdf to the included.Rnw. However, I cannot forward search from the included to the pdf. Is this how it is expected to work? Forward and inverse search work between main Rnw and pdf. I am pasting below the code in the

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-11 Thread Duncan Murdoch
On 13-01-10 4:54 PM, michele caseposta wrote: Hi everybody, thanks for the replies. I might have not explained the problem completely. Duncan Mackay: Yes, I am already having a master file and separate Rnw files. Duncan Murdock: I am using patchDVI in the TexShop Sweave engine. Sync works flawles

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-10 Thread Duncan Murdoch
On 13-01-10 4:54 PM, michele caseposta wrote: Hi everybody, thanks for the replies. I might have not explained the problem completely. Duncan Mackay: Yes, I am already having a master file and separate Rnw files. Duncan Murdock: I am using patchDVI in the TexShop Sweave engine. Sync works flawles

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-10 Thread michele caseposta
Hi everybody, thanks for the replies. I might have not explained the problem completely. Duncan Mackay: Yes, I am already having a master file and separate Rnw files. Duncan Murdock: I am using patchDVI in the TexShop Sweave engine. Sync works flawlessly between the master file and the pdf produce

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-10 Thread Duncan Murdoch
On 13-01-09 9:09 PM, Duncan Murdoch wrote: On 13-01-09 3:25 PM, michele caseposta wrote: Hello everyone. I am in the process of writing a book in Latex with Texshop, on Mac. This book contains a lot of R code, hence the need to use Sweave. I was able to compile Rnw files, and to sync back and fo

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-09 Thread Duncan Murdoch
On 13-01-09 3:25 PM, michele caseposta wrote: Hello everyone. I am in the process of writing a book in Latex with Texshop, on Mac. This book contains a lot of R code, hence the need to use Sweave. I was able to compile Rnw files, and to sync back and forth from the pdf to the source Rnw. My prob

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-09 Thread Duncan Mackay
Hi Perhaps you need to make a master file and call the chapter files from it eg (just copying the relevant section from my master GClimate12.Rnw file) latex preliminaries + R options + begin % plots \SweaveInput{GClimate12RX.Rnw} % Soil 300 % 15 \SweaveInput{GClimate12SP.R

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-09 Thread michele caseposta
Hi Yihui, yes, RStudio works flawlessly with synchronization, but working with it I will lose all the features of a full-fledged tex editor, first of all BibDesk integration. Texworks can also do two-way sync in Rnw, and I tried to switch configurations but with no luck. In texworks I am using R

Re: [R] Sweave, Texshop, and sync with included Rnw file

2013-01-09 Thread Yihui Xie
I believe RStudio has done a fairly good job in terms of the synchronization. If you have to stick to TeXShop, I do not have any ideas on how to make it work with Sweave child documents. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State Un

[R] Sweave, Texshop, and sync with included Rnw file

2013-01-09 Thread michele caseposta
Hello everyone. I am in the process of writing a book in Latex with Texshop, on Mac. This book contains a lot of R code, hence the need to use Sweave. I was able to compile Rnw files, and to sync back and forth from the pdf to the source Rnw. My problem now is that the book is divided in Chapters,

Re: [R] sweave and lessR

2012-12-16 Thread Scott Cushman
Thank you for the reply. With many calls to Density() I miss Sweave taking care of the naming of the files and the generating of the \includegraphics statements, but I guess this will work. On Dec 16, 2012, at 2:54 PM, Duncan Murdoch wrote: > On 12-12-16 12:42 PM, Scott Cushman wrote: >> >> H

Re: [R] sweave and lessR

2012-12-16 Thread Duncan Murdoch
On 12-12-16 3:12 PM, Scott Cushman wrote: Thank you for the reply. With many calls to Density() I miss Sweave taking care of the naming of the files and the generating of the \includegraphics statements, but I guess this will work. You (or the lessR author) could possibly write your own custo

Re: [R] sweave and lessR

2012-12-16 Thread Duncan Murdoch
On 12-12-16 12:42 PM, Scott Cushman wrote: Hello I am using sweave with the Density() function from lessR package. However, unlike the older color.density() function, Density() does not work with the standard graphic output functions in R, such as pdf. Is there away to include figures fgenera

[R] sweave and lessR

2012-12-16 Thread Scott Cushman
Hello I am using sweave with the Density() function from lessR package. However, unlike the older color.density() function, Density() does not work with the standard graphic output functions in R, such as pdf. Is there away to include figures fgenerated rom lessR in sweave documents? thank yo

Re: [R] sweave xtable and driver RweaveHTML

2012-11-08 Thread Duncan Mackay
Hi I have sometimes had to produce an html table in Sweave for a complicated table and have make a chunk of it . cut down version below. You could use the defaults for write.table fhtml <- paste(baseRimg, "-T", ".html", sep = "") if (file.exists(fhtml) ) file.remove(fhtml) file

Re: [R] sweave xtable and driver RweaveHTML

2012-11-08 Thread Yihui Xie
You can certainly generate an HTML table, but how about the rest of your Snw document? How are you going to convert them to HTML? I mean otherwise you get something like this which is not a valid HTML document: \documentclass{article} \begin{document} Sepal.Length Sepal.Width Petal.Lengt

[R] sweave xtable and driver RweaveHTML

2012-11-08 Thread Witold E Wolski
Hi, So far I used Sweave to create pdf reports. I used xtable to create some tables in the report. But now I would like to use the same snw file to generate an HTML version. The xtable output breaks the RweaveHTML driver. library(R2HTML) Sweave('analyseLFQ.Snw', driver = RweaveHTML) Error in mat

Re: [R] Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}

2012-09-20 Thread Duncan Murdoch
On 20/09/2012 9:05 AM, Duncan Murdoch wrote: On 20/09/2012 8:47 AM, Witold E Wolski wrote: > 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 > > \ifpap

Re: [R] Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}

2012-09-20 Thread Yihui Xie
If you want to program Sweave documents, you can try the knitr package. This case will be something like: <<>>= paper <- TRUE # or change it to FALSE @ <>= @ i.e. you use the logical variable 'paper' to control which child document to include in the parent document. See http://yihui.name/knitr/

Re: [R] Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}

2012-09-20 Thread Duncan Murdoch
On 20/09/2012 8:47 AM, Witold E Wolski wrote: 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"}

[R] Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}

2012-09-20 Thread Witold E Wolski
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 give

Re: [R] Sweave problem after R update version

2012-09-17 Thread jeff harring
Is there a way to set the echo to be false as the code that was presented (by the way it worked well) shows up in the document? Thanks for any help here. -- View this message in context: http://r.789695.n4.nabble.com/Sweave-problem-after-R-update-version-tp4566044p4643366.html Sent from the

Re: [R] Sweave problem after R update version

2012-09-17 Thread jeff harring
I have been having the same problem. It appears to be linked to setting the working directory. <<>>= setwd("c:...") @ Then the error arrives. Any suggestions? -- View this message in context: http://r.789695.n4.nabble.com/Sweave-problem-after-R-update-version-tp4566044p4643363.html Sent fr

Re: [R] Sweave Error: c("'...Rnw'", "'...Rnw'") is not ASCII and does not declare an encoding

2012-09-10 Thread Prof Brian Ripley
On 10/09/2012 11:49, Duncan Murdoch wrote: On 12-09-10 3:28 AM, Christian Hoffmann wrote: Sorry to bother everyone. What has changed in Sweave since 2009? Sweave("Crs.Rnw") Error: c("'Crs.HdrFct.Rnw'", "'Crs.Rnw'") is not ASCII and does not declare an encoding No error in 2009 with the same fi

Re: [R] Sweave Error: c("'...Rnw'", "'...Rnw'") is not ASCII and does not declare an encoding

2012-09-10 Thread Duncan Murdoch
On 12-09-10 3:28 AM, Christian Hoffmann wrote: Sorry to bother everyone. What has changed in Sweave since 2009? Sweave("Crs.Rnw") Error: c("'Crs.HdrFct.Rnw'", "'Crs.Rnw'") is not ASCII and does not declare an encoding No error in 2009 with the same files. heers Christian vignettes are now

[R] Sweave Error: c("'...Rnw'", "'...Rnw'") is not ASCII and does not declare an encoding

2012-09-10 Thread Christian Hoffmann
Sorry to bother everyone. What has changed in Sweave since 2009? Sweave("Crs.Rnw") Error: c("'Crs.HdrFct.Rnw'", "'Crs.Rnw'") is not ASCII and does not declare an encoding No error in 2009 with the same files. heers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland R

  1   2   3   4   5   6   7   8   >