Re: [R] traceback performs differently in "interactive-mode" then in "script-mode"

2022-12-21 Thread Yihui Xie
Hi Malte, I think I asked the same question on Stack Overflow ten years ago: https://stackoverflow.com/q/13116099/559676 I hope you'll find the answer helpful there. Regards, Yihui -- https://yihui.org On Wed, Dec 21, 2022 at 6:19 AM Flender, Malte wrote: > Hello, > > a few days ago I

Re: [R] problems in knitting to html

2021-04-20 Thread Yihui Xie
1.7.2knitr_1.31 > magrittr_2.0.1markdown_1.1 > methods_4.0.5 mime_0.10 rlang_0.4.10 rmarkdown_2.7 > stats_4.0.5 stringi_1.5.3 > stringr_1.4.0 tinytex_0.31 tools_4.0.5 utils_4.0.5 > xfun_0.22 yaml_2.2.1 > > P

Re: [R] problems in knitting to html

2021-04-20 Thread Yihui Xie
Could you provide a minimal reproducible example along with your xfun::session_info('rmarkdown')? Thanks! Regards, Yihui -- https://yihui.org On Tue, Apr 20, 2021 at 11:06 AM Troels Ring wrote: > > Dear friends - newly installed windows 10 and R version 4.0.5 > (2021-03-31) -- "Shake and Throw"

Re: [R] rmarkdown and source call to R file.

2021-01-22 Thread Yihui Xie
I don't know the answer (there are multiple possible reasons for the file not being found), but as the first step to debug the problem, you may replace this chunk ```{r, echo=FALSE} library(knitr) source("helper.R", local = knitr::knit_global())

Re: [R] R Markdown & chunk extraction in R

2020-04-08 Thread Yihui Xie
e if I am wrong. > > Best, > Ashim > > On Wed, Apr 8, 2020 at 8:47 PM Yihui Xie wrote: >> >> And please note that knitr::knit_code$get() only works (i.e. returns a >> named list of code chunks) inside a knitr document when the document >> _is being knitted_. It doe

Re: [R] R Markdown & chunk extraction in R

2020-04-08 Thread Yihui Xie
And please note that knitr::knit_code$get() only works (i.e. returns a named list of code chunks) inside a knitr document when the document _is being knitted_. It doesn't work outside the document. Ideally, you should use the document parser of knitr, but it is not exported. Regards, Yihui --

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Yihui Xie
params$data is "hawaii" in this case, so the output of ``r params$data`` is `hawaii` The double backticks don't have any special meaning here. Only the inside pair of backticks (i.e. `r `) makes sense to R Markdown (or precisely speaking, knitr). The outside pair will be left untouched

Re: [R] TOC in vignette (knitr::rmarkdown)

2019-08-26 Thread Yihui Xie
output: rmarkdown::html_vignette: toc: true The syntax is the same for all R Markdown output formats: https://bookdown.org/yihui/rmarkdown/html-document.html#table-of-contents Regards, Yihui -- https://yihui.name On Mon, Aug 26, 2019 at 9:32 AM Helmut Schütz wrote: > > Dear all, > > I

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Yihui Xie
In case Jeff's point was not clear enough: the *.nb.html file is very similar to *.ipynb and it is very different with other output formats that R Markdown generates. A .nb.html file is generated alongside .Rmd when you preview an R Markdown notebook, and it contains both the R Markdown source

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Yihui Xie
I just have one comment on the multi-language support in R Markdown (inline below): On Thu, Oct 11, 2018 at 6:19 AM Ista Zahn wrote: > > Hi Spencer, > > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves > wrote: > > > > Hello: > > > > > >What are the differences between Jupyter notebooks

Re: [R] RMarkdown question

2017-08-29 Thread Yihui Xie
Although it is not an elegant solution, but if your output format is HTML, you can add an arbitrary empty HTML element like before your code chunk. Then you can jump to this via a link like "see [this code chunk](#foo)". Regards, Yihui -- https://yihui.name On Tue, Aug 29, 2017 at 1:30 PM,

Re: [R] Paths in knitr

2017-06-12 Thread Yihui Xie
ules of Rmd files which can then easily be integrated into a Rmd > report. I have yet to see how I can include these file into a complete > report. > > Kind regards > > Georg > > > - Weitergeleitet von Georg Maubach/WWBO/WW/HAW am 12.06.2017 08:47 > - > > Von:

Re: [R] Paths in knitr

2017-06-09 Thread Yihui Xie
base.dir was a try, but did not work. > > Can you give me a hint where I can find information/documentation on this > path issue? > > Kind regards > > Georg > > > > Gesendet: Donnerstag, 08. Juni 2017 um 15:05 Uhr > > Von: "Yihui Xie" <x...@yihui.name>

Re: [R] Paths in knitr

2017-06-08 Thread Yihui Xie
Why do you have to set the base.dir option? Regards, Yihui -- https://yihui.name On Thu, Jun 8, 2017 at 6:15 AM, wrote: > Hi All, > > I have to compile a report for the management and decided to use RMarkdown > and knitr. I compiled all needed plots (using separate R

Re: [R] Is ImageMagick package not compatible with R 3.3.2?

2017-03-15 Thread Yihui Xie
I'm the author of the animation package, and I do plan to switch to the magick package in the future instead of using ImageMagick as a system dependency. Regards, Yihui -- https://yihui.name On Wed, Mar 15, 2017 at 12:32 AM, Bert Gunter wrote: > A google search on

Re: [R] roxygen2 v6.0.0

2017-02-06 Thread Yihui Xie
, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name On Mon, Feb 6, 2017 at 9:46 AM, Marc Girondot via R-help <r-help@r-project.org> wrote: > Hi, > > I used roxygen2 v5.0.1 to document my package, and all was ok. I have just > updated to roxygen2 v6.0.0 and m

Re: [R] WordCloud Does not display in RMD File in R Studio

2016-07-29 Thread Yihui Xie
Typically you don't need to open the png() device manually. Try comment out that line. BTW, I'm not sure which wordcloud package you were using, but this one is the best one I have seen: https://github.com/Lchiffon/wordcloud2 Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web

Re: [R] tikzDevice and Sweave

2016-01-18 Thread Yihui Xie
be reduced to the absolutely minimal: \documentclass{article} \begin{document} <<tikzFig, echo=FALSE, dev='tikz', fig.width=4, fig.height=3>>= plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab = "sin(x)") @ \end{document} Regards, Y

Re: [R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Yihui Xie
): install.packages("tikzDevice", repos="https://cran.rstudio.com;) # make sure your version of R supports https Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name On Fri, Jan 15, 2016 at 9:37 PM, Ranjan Maitra <maitra.mbox.igno...@inbox.com> wrote:

Re: [R] conditionally disable evaluation of chunks in Rmarkdown...

2015-11-10 Thread Yihui Xie
anyway, you may use a custom function to do it. e.g. cond_eval = function(x) { if (isTRUE(knitr::opts_chunk$get('eval'))) x } Then `r cond_eval(x)` instead of `r x`. Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name On Tue, Nov 10, 2015 at 4:40 AM, Witold E Wolski <w

Re: [R] r-markdown - keeping figures

2015-10-21 Thread Yihui Xie
html_document: keep_md: yes --- Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name On Wed, Oct 21, 2015 at 7:21 AM, Jeff Newmiller <jdnew...@dcn.davis.ca.us> wrote: > I think the default now is to not save them unless you set the fig.path chunk >

Re: [R] Error: pandoc version 1.12.3 or higher is required and was not found

2015-09-23 Thread Yihui Xie
knitr::pandoc() and rmarkdown::render() :-) Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name On Wed, Sep 23, 2015 at 6:13 AM, Ryszard Czermiński <rysz...@czerminski.net> wrote: > I am trying to use R Markdown, but call to render() gives me an error: > Err

Re: [R] Error in .External2(C_X11, paste(png::, filename, sep = ), g$width, : unable to start device PNG

2015-08-11 Thread Yihui Xie
-dep r-base-dev). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, Aug 11, 2015 at 8:32 AM, Ramiro Barrantes ram...@precisionbioassay.com wrote: Hello, I have the following reproducible knitr document: \documentclass{article} \usepackage[sc]{mathpazo

Re: [R] Knitr: setting echo = FALSE globally

2015-07-20 Thread Yihui Xie
Section 5.1.3 of the book Dynamic Documents with R and knitr is titled Global Options. I don't know how to make it more clear for readers to find information on global options in the book. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Mon, Jul 20, 2015 at 12:58 PM

Re: [R] Trellis Plots: translating lattice xyplot() to ggplot() [RESOLVED]

2015-07-11 Thread Yihui Xie
some lessons on what a reproducible example means. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Sat, Jul 11, 2015 at 9:03 AM, Rich Shepard rshep...@appl-ecosys.com wrote: On Fri, 10 Jul 2015, Yihui Xie wrote: Your LyX example has two problems: Yihui, et al

Re: [R] Knitr/Lattice/Lyx [was: Trellis Plots: translating lattice xyplot() to ggplot()]

2015-07-11 Thread Yihui Xie
(), that often means the code is not syntactically correct. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Sat, Jul 11, 2015 at 7:07 PM, Rich Shepard rshep...@appl-ecosys.com wrote: On Sat, 11 Jul 2015, Yihui Xie wrote: I guess you didn't tell us you were compiling

Re: [R] Trellis Plots: translating lattice xyplot() to ggplot()

2015-07-10 Thread Yihui Xie
() the plot, and no need to pdf(), either. See the attached PDF I generated. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Fri, Jul 10, 2015 at 7:18 PM, Rich Shepard rshep...@appl-ecosys.com wrote: On Fri, 10 Jul 2015, David Winsemius wrote: #Generally one needs

Re: [R] Rmarkdown / knitr naming the output file

2015-07-06 Thread Yihui Xie
There is no direct way to get it, but you can get 1) the input filename via knitr::current_input(), and 2) the output format via knitr::opts_knit$get('rmarkdown.pandoc.to'). You may be able to figure out the output filename based on these two pieces of information. Regards, Yihui -- Yihui Xie

Re: [R] what constitutes a 'complete sentence'?

2015-07-03 Thread Yihui Xie
MASS does: http://cran.rstudio.com/web/packages/MASS/index.html Turns out its description is not a complete sentence, either. Sounds like R has become a language for statistical computing and graphics, plus English grammar since 3.0.x. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http

Re: [R] png package in Ubuntu 12.04 with R 3.1.0

2015-05-26 Thread Yihui Xie
sudo apt-get install libpng12-dev I'm not sure about Ubuntu 12.04. You may need a different libpng??-dev. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, May 26, 2015 at 2:10 AM, Gygli, Gudrun gudrun.gy...@wur.nl wrote: Dear All, I am using R to analyse

Re: [R] Suggestions for workaround for R Markdown problem with data() ?

2015-01-12 Thread Yihui Xie
also try to reinstall the package: BiocInstaller::biocLite('IlluminaHumanMethylation450kanno.ilmn12.hg19') --- output: pdf_document --- ```{r} library(IlluminaHumanMethylation450kanno.ilmn12.hg19) data(IlluminaHumanMethylation450kanno.ilmn12.hg19) ``` Regards, Yihui -- Yihui Xie xieyi

Re: [R] R Markdown and scan()

2014-10-25 Thread Yihui Xie
the only way is to make a connection, such as textConnection() as you mentioned. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Sat, Oct 25, 2014 at 10:58 AM, John Fox j...@mcmaster.ca wrote: Dear Peter, Thanks for the suggestion -- it's a bit better for the example I

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

2014-10-21 Thread Yihui Xie
{document} = degree - ° print(degree) @ \end{document} Similar things apply to ü. You need to specify the argument `encoding = 'UTF-8'` when calling Sweave() or knitr::knit(). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, Oct 21, 2014 at 10:58 PM, Marc Girondot marc_

Re: [R] shiny datatables column filtering plugin

2014-09-03 Thread Yihui Xie
or may not be enough. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Wed, Sep 3, 2014 at 7:12 AM, Charles Determan Jr deter...@umn.edu wrote: Thank you for checking Yihui, on the off chance are you familiar with any other methods to filter on multiple conditions? On Tue

Re: [R] shiny datatables column filtering plugin

2014-09-03 Thread Yihui Xie
}, targets: [0, 1, 2, 3, 4] }] }) The global search box works, though. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Wed, Sep 3, 2014 at 2:09 PM, Charles Determan Jr deter...@umn.edu wrote: Thank you Yihui, this would certainly work for me however I have having trouble

Re: [R] shiny datatables column filtering plugin

2014-09-02 Thread Yihui Xie
, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, Sep 2, 2014 at 11:59 AM, Charles Determan Jr deter...@umn.edu wrote: Greetings, I am currently exploring some capabilities of the 'Shiny' package. I am currently working with the most recent version of 'shiny' from

Re: [R] Apply rmarkdown::render() outside the RStudio don't find pandoc

2014-08-28 Thread Yihui Xie
could be wrong). Anyway, at least you have to let your system know where is pandoc-citeproc (per instructions above again), which may or may not be the problem given the missing error message. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Thu, Aug 28, 2014 at 2:06 PM

Re: [R] knitr and stopifnot replacement.

2014-08-22 Thread Yihui Xie
Yep, that is exactly the answer. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Fri, Aug 22, 2014 at 6:35 AM, Bart Kastermans kaste...@kasterma.net wrote: On 22 Aug 2014, at 12:39, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 22/08/2014, 6:02 AM, Bart

Re: [R] a knitr question

2014-07-31 Thread Yihui Xie
Great. I also said I see the point of keeping prompts, and that is why the chunk option prompt=TRUE is provided in knitr. I may not agree with your preference, but that does not mean I should stop you completely from having your own preference. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web

Re: [R] one more knitr question, please

2014-07-30 Thread Yihui Xie
Not sure if you mean \newpage{}/\pagebreak{} in LaTeX. If that is the case, it is possible but easy, and I do not understand why you want to break a code chunk onto two pages. The easiest thing to do is just to write two code chunks. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http

Re: [R] a knitr question

2014-07-30 Thread Yihui Xie
of post-processing the prompts, but this problem would not have existed in the first place if we do not include prompts at all. I'm not sure if it makes much sense to create some mess and clean it afterwards. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Wed, Jul 30

Re: [R] a knitr question

2014-07-30 Thread Yihui Xie
No. That is not my suggestion. Joshua Wiley correctly explained what I was suggesting. Prompts are useful in the R console, but not necessarily in a report. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Wed, Jul 30, 2014 at 6:47 PM, Duncan Murdoch murdoch.dun

Re: [R] a knitr question

2014-07-29 Thread Yihui Xie
Yeah, it is just my personal opinion. Some users like it, and some do not. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, Jul 29, 2014 at 5:36 PM, Peter Alspach peter.alsp...@plantandfood.co.nz wrote: Kia ora Erin But beware - to quote from Yihui 2013

Re: [R] saveSWF Error Message: file association not available or invalid

2014-05-29 Thread Yihui Xie
This is not a big problem. It just means your system does not have a default program to open .swf files. If you associate, say, a movie player, with .swf, this problem will go away. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Thu, May 29, 2014 at 6:04 AM, Cheryl

Re: [R] Rscript and roxygen error

2014-05-26 Thread Yihui Xie
library(methods) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Mon, May 26, 2014 at 9:48 AM, Witold E Wolski wewol...@gmail.com wrote: the same script which is not working with Rscript does work with R CMD BATCH. I thought the main difference between Rscript and R

Re: [R] Warning Message: In saveSWF({ : the executablepng2swf.exedoes not exist!

2014-05-17 Thread Yihui Xie
That means saveSWF() cannot find SWF Tools, and you should either put it on PATH or provide its installation path. See `swftools` in ?animation::saveSWF Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Sat, May 17, 2014 at 9:25 AM, Cheryl Johnson johnson.cheryl

Re: [R] equivalent of $\check Y$ in plotmath

2014-02-23 Thread Yihui Xie
}$') dev.off() system('pdflatex test-math.tex') Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Sat, Feb 22, 2014 at 9:29 PM, Ranjan Maitra maitra.mbox.igno...@inbox.com wrote: Hi, I am trying to put the expression which in LaTeX would be $\check Y$ as a label

Re: [R] creating an equivalent of r-help on r.stackexchange.com ? (was: Re: Should there be an R-beginners list?)

2014-02-07 Thread Yihui Xie
odd). I just want to support Barry's opinion: mailing lists are good for discussions, and SO/SE is good for QA's. Nothing is good for everything. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name __ R-help@r-project.org mailing list

Re: [R] Controlling font size on code chunk outputs using Knitr

2014-02-03 Thread Yihui Xie
, or in .Rprofile -- again, please read the documentation carefully. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Fri, Jan 31, 2014 at 6:18 PM, Jeff Johnson mrjeffto...@gmail.com wrote: Yihui/Jeff, I'm trying to determine where the default CSS file is located as I don't see

Re: [R] In RStudio/Win7, which directory stores the markdown.css file?

2014-02-03 Thread Yihui Xie
list. That said, in the spirit of a mailing list, please do not post an old question in a new thread. I have just replied to your last question in the other thread. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Mon, Feb 3, 2014 at 10:54 AM, Jeff Newmiller jdnew

Re: [R] Controlling font size on code chunk outputs using Knitr

2014-01-30 Thread Yihui Xie
Exactly. Please see RStudio documentation: https://support.rstudio.com/hc/en-us/articles/200552186-Customizing-Markdown-Rendering Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Thu, Jan 30, 2014 at 10:57 AM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: This sounds

Re: [R] Controlling font size on code chunk outputs using Knitr

2014-01-29 Thread Yihui Xie
Please provide a minimal example -- are you using R Markdown or R HTML? Both can produce HTML output: http://yihui.name/knitr/demo/minimal/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Wed, Jan 29, 2014 at 10:49 AM, Jeff Johnson mrjeffto...@gmail.com wrote: Hi

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Yihui Xie
.Rnw= @ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Mon, Jan 27, 2014 at 8:20 PM, Duncan Mackay dulca...@bigpond.com wrote: Hi I use Sweave and have a master Rnw file and parent files. If there are large chunks I split them up and then just put a % in front

Re: [R] robust definition of \code{} for a knitr-produced document

2014-01-04 Thread Yihui Xie
could be wrong with an example that works. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Fri, Jan 3, 2014 at 2:09 PM, Michael Friendly frien...@yorku.ca wrote: [Not sure if I should post this here, or on a another list, but will try here first...] For a book I'm

Re: [R] Knitr, ggplot and consistent fonts

2013-12-23 Thread Yihui Xie
attachment (not sure if an Rnw document can get through), or a Github gist, or pastebin instead, e.g. https://gist.github.com/yihui/8105762 Or ask on SO: http://stackoverflow.com/questions/tagged/r Now let's move back to the original question, to which I have no solution. Regards, Yihui -- Yihui

Re: [R] Should there be an R-beginners list?

2013-11-24 Thread Yihui Xie
there be an R-beginners list?) Last but not least, I probably need to clarify that I benefited a lot from the mailing lists in the past, and I truly appreciate it. I wrote this with the future in mind, not the past. The past was good, and the future can be better. Regards, Yihui -- Yihui Xie xieyi

Re: [R] Should there be an R-beginners list?

2013-11-24 Thread Yihui Xie
-- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Nov 24, 2013 at 2:00 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 13-11-24 2:04 PM, Yihui Xie wrote: I'm not aware of a discussion on this, but I

Re: [R] Scripting call to R-Studio compile PDF

2013-10-24 Thread Yihui Xie
Yes, that is pretty much it. Setting the options useDingbats or concordance is optional. You may or may not really need them. What is essential is the knit() function. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] Scripting call to R-Studio compile PDF

2013-10-23 Thread Yihui Xie
RStudio also uses a script to compile Rnw files to PDF; you can see all the magic in the Compile PDF pane (next to your Console pane) after you click the button Compile PDF. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] knitr and functions generating latex

2013-10-09 Thread Yihui Xie
guess is results='asis'= whatever_your_figure_functions_are() @ So please provide a minimal example, and avoid indefinite descriptions like seems or feels like (in particular, this should be easy made me feel my IQ suddenly dropped by 50%). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http

Re: [R] rbenchmark: why is function benchmark back-quoted?

2013-10-08 Thread Yihui Xie
2 %in% Error: unexpected SPECIAL in %in% `%in%` function (x, table) match(x, table, nomatch = 0L) 0L environment: namespace:base Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Oct 8

Re: [R] Should I wrap more package examples in \dontrun{} ?

2013-09-03 Thread Yihui Xie
not really have to open R and run example(foo), and you have comments/interactivity/Google Analytics, etc... Rd is an excellent format for documenting function arguments and showing quick examples, though. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics

Re: [R] Should I wrap more package examples in \dontrun{} ?

2013-09-03 Thread Yihui Xie
clone` (or whatever version control tools) and the whole website can be rebuilt offline (normally via `make` or other simple commands). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Sep 3

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

2013-09-02 Thread Yihui Xie
} Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Sep 2, 2013 at 2:18 PM, David Epstein david.epst...@warwick.ac.uk wrote: Dear Thierry, Your suggestion doesn't work on my version of R. Here's

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

2013-09-02 Thread Yihui Xie
of print(). However, due to the bug in Sweave pointed out by Yihui, replacing print by cat didn't help me. Thanks David Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] installing rJava

2013-07-30 Thread Yihui Xie
). I'm not sure if that has changed or not. Michael's repository has been working well for me (including many other R packages that have system dependencies). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle

Re: [R] tikzDevice

2013-07-27 Thread Yihui Xie
can resurrect this great package and the original author is willing to hand over the maintainership. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle On Sat, Jul 27, 2013 at 6:49 PM, David Arnold dwarnol

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-19 Thread Yihui Xie
understands R cannot understand markdown. I understand you do not have control over your lab machines, but you still have other options like your own laptop (if you do not like RStudio, feel free to remove it and use your favorite editors after you have got the idea). Regards, Yihui -- Yihui Xie

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yihui Xie
this page), and more examples at https://github.com/yihui/knitr-examples If you are asking about the internals of knitr, Luke, use the source: https://github.com/yihui/knitr Or for a more comprehensive introduction, see http://www.crcpress.com/product/isbn/9781482203530 Regards, Yihui -- Yihui Xie

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yihui Xie
support. knitr and its website are open source; please feel free to improve them if you find anything unclear: http://yihui.name/en/2013/06/fix-typo-in-documentation/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center

Re: [R] Lexical scoping is not what I expect

2013-06-28 Thread Yihui Xie
I just realized this was also possible: assign('TRUE', FALSE) TRUE [1] TRUE get('TRUE') [1] FALSE but it is probably a different story. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle On Fri, Jun 28

Re: [R] knitr without R studio

2013-06-19 Thread Yihui Xie
knitr is not tied to RStudio, and I believe this StackOverflow post can answer your question: http://stackoverflow.com/q/10646665/559676 Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle On Wed, Jun 19, 2013

Re: [R] knitr: side-by-side figures in R markdown

2013-06-19 Thread Yihui Xie
alignment without display:block. The difficulty comes from the fact that Markdown images are not put into div containers as in HTML. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle On Wed, Jun 19, 2013 at 6:23

Re: [R] Composite Quantile Regression

2013-04-05 Thread Yihui Xie
announcement of softImpute and Tibshirani's covTest). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Apr 5, 2013 at 12:55 PM, Frank Harrell f.harr...@vanderbilt.edu wrote

Re: [R] Execution halted when I use knitr and Rscript with opts_chunk

2013-03-26 Thread Yihui Xie
Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Mar 26, 2013 at 12:30 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 26/03/2013 12:26 PM, Marcus Nunes wrote: Hello

[R] [R-pkgs] knitr version 1.1

2013-02-22 Thread Yihui Xie
questions, please follow these links. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA ___ R-packages mailing list r-packa...@r

Re: [R] tidy.source() gets confused when # is not a comment but a part of a literal string?

2013-02-16 Thread Yihui Xie
Please scroll down to Section 7: https://github.com/yihui/formatR/wiki And this has been reported at https://github.com/yihui/formatR/issues/26 I'll try to fix it after R 3.0 is released. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] sweave question

2013-02-13 Thread Yihui Xie
-- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Feb 13, 2013 at 4:59 PM, Mark Leeds marklee...@gmail.com wrote: Hi Everyone: I was having trouble getting the plot size correct when

Re: [R] Migrating R packages from svn/R-Forge to git/Github

2013-02-10 Thread Yihui Xie
and then work under Windows. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Feb 10, 2013 at 12:02 PM, Michael Friendly frien...@yorku.ca wrote: [I'm not sure if this post

Re: [R] First R Package --- Advice?

2013-02-05 Thread Yihui Xie
My short answer is to watch this video by Jeffrey Horner http://youtu.be/ScV7XXlBZww and learn roxygen2. And the long answer is to read the manual which has everything you need: http://cran.r-project.org/doc/manuals/r-release/R-exts.html Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515

Re: [R] First R Package --- Advice?

2013-02-05 Thread Yihui Xie
I have a minimal package here based on roxygen2: https://github.com/yihui/rmini Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Feb 5, 2013 at 11:49 PM, ivo welch

Re: [R] Setting inline hook to a function identical to default in knitr turns of exponential formatting

2013-01-28 Thread Yihui Xie
the technical implementation of this package. For the default hooks according to the output format, see http://yihui.name/knitr/hooks and ?render_latex in the documentation. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

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

2013-01-17 Thread Yihui Xie
}% \endgroup% \fi} \input{foo-concordance.tex} setup, include=FALSE= opts_knit$set(concordance=TRUE) @ \begin{document} = for (i in 1:5) { print(i) } @ \end{document} Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] help with knit_hooks

2013-01-10 Thread Yihui Xie
, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Jan 10, 2013 at 6:51 AM, Francesco Sarracino f.sarrac...@gmail.com wrote: Dear R-listers, does anybody can suggest some manual

Re: [R] how to label two figures in the same chunk independently with knitr

2013-01-09 Thread Yihui Xie
)) }) opts_chunk$set(mypar = TRUE) For par(bg=rgb(runif(1), runif(1), runif(1))), it is nothing but a line of normal R code. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Jan 9

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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] how to label two figures in the same chunk independently with knitr

2013-01-08 Thread Yihui Xie
chunk) And here is a preview: http://i.imgur.com/4lKpw.png Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jan 8, 2013 at 4:17 AM, Francesco Sarracino f.sarrac

Re: [R] Esttab error while exporting regression results

2012-12-27 Thread Yihui Xie
) esttab() @ \end{document} Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Dec 23, 2012 at 5:42 PM, Francesco Sarracino f.sarrac...@gmail.com wrote: Dear listers, I am

Re: [R] Problem with large/small numbers in knitr

2012-12-27 Thread Yihui Xie
happened. All I can suggest in this case is to update R and run update.packages() as indicated by FAQ1: https://github.com/yihui/knitr/blob/master/FAQ.md Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor

Re: [R] Problem with figures

2012-12-03 Thread Yihui Xie
there is a subtle difference somewhere between your Debian TeXLive and my Ubuntu TeXLive... Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Dec 3, 2012 at 9:29 AM, Shige Song shiges

Re: [R] R-Forge not building packages?

2012-12-03 Thread Yihui Xie
R users (especially Windows users) how to install R packages via R CMD INSTALL or devtools::install_github(). That is usually a lot faster than R-Forge. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] Problem with figures

2012-12-02 Thread Yihui Xie
, e.g. in this case you will see ! LaTeX Error: Option clash for package preview. The log file is at figure/fig1.log by default in your case. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor

Re: [R] knitr error with Lyx

2012-11-29 Thread Yihui Xie
problem. Letting MikTeX install the missing LaTeX packages on the fly might solve the problem. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Nov 29, 2012 at 10:53 AM, Mark

Re: [R] Can R be embedded in html?

2012-11-29 Thread Yihui Xie
I did not read every reply; perhaps someone has already mentioned Shiny. There are a few live examples of embedding R in HTML here: http://www.rstudio.com/shiny/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] knitr error with Lyx

2012-11-29 Thread Yihui Xie
That is very helpful! Just to continue debugging, can you save the two versions of the tex files produced from LyX with different versions of R and do a diff on them? It sounds like something has changed from R 2.15.0 to 2.15.2. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465

Re: [R] googleVis plot and knitr/sweave

2012-11-29 Thread Yihui Xie
I'm not aware of the possibility of embedding google vis in PDF: https://developers.google.com/chart/interactive/docs/gallery I do not think everything has to live in PDF, otherwise what is the point of HTML/JS and web browsers? Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465

Re: [R] googleVis plot and knitr/sweave

2012-11-29 Thread Yihui Xie
Then you can take a look at the ggmap (on CRAN) or snippets package (on Simon's RFroge: http://rforge.net/snippets/), which supports OpenStreet Map; googleVis is HTML/SVG based. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics

Re: [R] sweave xtable and driver RweaveHTML

2012-11-08 Thread Yihui Xie
align=right 1.40 /TD TD align=right 0.20 /TD TD setosa /TD /TR /TABLE \end{document} It is not easy to write a document for both LaTeX and HTML, although the R output can be easily converted to either LaTeX or HTML. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http

Re: [R] Controlling R fonts through LaTeX

2012-11-08 Thread Yihui Xie
you to generate R plots with font style consistent with your main document. Two other examples: https://github.com/downloads/yihui/knitr/knitr-manual.pdf and https://github.com/downloads/yihui/knitr/knitr-graphics.pdf Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Yihui Xie
, file = 'yourfile.tex'); if you changed your working directory before that, the tex file will be written to an unexpected place. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

  1   2   3   4   >