Re: [Rd] Best practices in developing package: From a single file

2018-01-31 Thread Yihui Xie
Similarly, I created this example a couple of years ago: https://github.com/yihui/rlp which shows that you can create a package from R Markdown documents (or any documents that knitr supports). Basically you can start with an R Markdown document, and after clicking a button in RStudio, you will get

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-28 Thread Yihui Xie
It seems the fix has not been ported to the patched version of R on Windows yet. I just tested R version 3.5.0 Patched (2018-04-27 r74667). IMHO this bug is so bad that it is worth a new release R 3.5.1 before it starts biting more users like this one https://stackoverflow.com/q/50077412/559676. B

Re: [Rd] Parametrized Vignettest in R packages

2018-07-09 Thread Yihui Xie
So far you haven't provided a reproducible example yet. I wonder what exactly the object `sample_analysis` is. Sounds like it is an environment. If that is the case, devtools::build_vignettes() will tangle (for the meaning of "tangle", see ?tools::buildVignette) your vignette into an invalid R scri

Re: [Rd] Parametrized Vignettest in R packages

2018-07-09 Thread Yihui Xie
I wonder if get(data(foo, package="myPackage")) could be rewritten as myPackage::foo. The latter will be a little more rigorous, because data(foo) simply returns a character string "foo", so you are essentially calling get ("foo"), and the default get(, inherits = FALSE) may cause you trouble somet

[Rd] Inconsistent returned values of normalizePath(NA_character_) on Windows and *nix

2018-12-07 Thread Yihui Xie
Hi, I just noticed normalizePath(NA_character_) returns NA_character_ on *nix but "%HOME%\\NA" on Windows (with a warning by default), where %HOME% denotes the HOME folder like "C:\\Users\\John". I'm not sure if this is a bug or by design. Regards, Yihui -- https://yihui.name ___

Re: [Rd] R 3.5.3 and 3.6.0 alpha Windows bug: UTF-8 characters in code are simplified to wrong ones

2019-04-10 Thread Yihui Xie
Since it is "technically easy" to disable the best fit conversion and the best fit is rarely good, how about providing an option for code/package authors to disable it? I'm asking because this is one of the most painful issues in packages that may need to source() code containing UTF-8 characters t

[Rd] Should requireNamespace(quietly = TRUE) suppress messages about overwritten S3 methods?

2019-05-10 Thread Yihui Xie
Hi, In the NEWS of R 3.6.0: > When loading namespaces, S3 method registrations which overwrite previous > registrations are now noted by default (using packageStartupMessage()). As a result, requireNamespace() with R 3.6.0 is no longer quiet as before, e.g., > requireNamespace('ggplot2', quiet

Re: [Rd] [External] Re: quiet namespace load is noisy

2019-07-23 Thread Yihui Xie
I mentioned the same thing a couple of months ago but didn't get a response: https://stat.ethz.ch/pipermail/r-devel/2019-May/04.html In your case of package vignettes, it is easy enough to suppress the messages via the knitr chunk option message = FALSE. However, I still wonder if it will be a

[Rd] Check for updates under Windows (Was: a reliable way to check the latest version of R on CRAN?)

2010-09-18 Thread Yihui Xie
me it is rarely the case. Therefore, I wish RGui could gain a new menu to check for updates of R. Thanks very much! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA -- Forwarded message --

Re: [Rd] Check for updates under Windows (Was: a reliable way to check the latest version of R on CRAN?)

2010-09-21 Thread Yihui Xie
Yes, that's more or less what I mean. Thanks! Maybe this functionality can be added to src/gnuwin32/rui.c Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Sep 21, 2010 at 6:54 AM,

Re: [Rd] R package BibTex entries: looking for a more general solution

2010-11-03 Thread Yihui Xie
I strongly support this proposal! I also find it inconvenient to cite some R packages and really do not like edit the BibTeX entries manually. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On

[Rd] redesign R.css for HTML help pages

2010-12-14 Thread Yihui Xie
serif fonts). Anyway, here is what I've done: https://github.com/yihui/configuration/raw/master/R.css This CSS file is under file.path(R.home('doc'), 'html') after installation. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statisti

Re: [Rd] CRAN package sizes

2011-02-13 Thread Yihui Xie
ould not implement the png() device along with pdf() and postscript(). I'm willing to provide a patch if needed. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Feb 13, 2

[Rd] Fwd: file mode lost in file.copy()?

2011-03-06 Thread Yihui Xie
any(okay)) okay[okay] <- file.append(to[okay], from[okay]) } Maybe something like this should be added to file.copy(): Sys.chmod(to[okay], file.info(from[okay])$mode) Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa

Re: [Rd] Fwd: file mode lost in file.copy()?

2011-03-06 Thread Yihui Xie
Great! Thanks a lot! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Mar 6, 2011 at 10:26 PM, Henrik Bengtsson wrote: > FYI, > > this seems to be a known problem that has bee

[Rd] deparse operators in expressions

2011-04-09 Thread Yihui Xie
LC_COLLATE=en_US.utf8 [5] LC_MONETARY=C LC_MESSAGES=en_US.utf8 [7] LC_PAPER=en_US.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets met

Re: [Rd] deparse operators in expressions

2011-04-10 Thread Yihui Xie
like +, - and *. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Apr 10, 2011 at 8:20 AM, Duncan Murdoch wrote: > On 11-04-09 9:43 PM, Yihui Xie wrote: >> >> Hi, >> >

Re: [Rd] R 2.13.0-beta for Windows, file.copy() throws suspicious errors due to default value of copy.mode

2011-04-23 Thread Yihui Xie
5] LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor

[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Yihui Xie
solved in R directly. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Yihui Xie
explanations to users. 2. Yes I was fully aware of the usefulness of those batch files. I was wishing for a direct solution. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, May 3, 2011

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Yihui Xie
to run Rscript.bat under Windows and Rscript under *nix. I hope they can be consistent. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, May 3, 2011 at 8:14 PM, Duncan Murdoch wrote:

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Yihui Xie
you all believe Windows people had better double click the shortcut on the desktop and work from that RGui? e.g. use Sweave() instead of R CMD Sweave? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Yihui Xie
ly set the PATH variable: system(paste('setx PATH "', normalizePath(R.home('bin')), ';', Sys.getenv('PATH'), '"', sep = '')) Nobody will feel comfortable with it, though. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http:

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Yihui Xie
via several approaches. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, May 4, 2011 at 12:28 AM, Gabor Grothendieck wrote: > On Wed, May 4, 2011 at 1:04 AM, Yihui Xie wrote: >&g

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Yihui Xie
works fine, I will remove all the old versions. I have never run into troubles in which I have no choice but to use the old version of R. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed,

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Yihui Xie
update R in our department from a version released long long ago. You may argue my samples are not representative. Anyway, I can accept the default version string if nobody agrees with me. I do use Emacs every day. It's nice, I totally agree. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 We

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Yihui Xie
these kinds of problems, do we need to worry about Rtools as well? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, May 4, 2011 at 1:33 PM, Kevin R. Coombes wrote: > There are plenty of go

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Yihui Xie
*, which is already in the PATH variable. Otherwise extra efforts will be required to run R as a single letter R -- this is what I wish we were able to do under Windows. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor

[Rd] Quote the path of graphics output in Sweave when it contains spaces

2011-06-20 Thread Yihui Xie
bject$output) linesout[thisline + 1L] <- srcline Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] customize the stylesheet R.css for a package?

2011-08-16 Thread Yihui Xie
Hi, Since R 2.13.0 the stylesheet R.css is installed a per-package basis, and I wish that package developers could be allowed to put a customized R.css in their packages. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [Rd] sysdata.rda, namespaces and package dependencies

2011-08-30 Thread Yihui Xie
I struggled with this for a while too, and I have no idea why this data object is unavailable. Finally I found this can do the trick: data(munsell_map, package = "munsell") munsell::mnsl("10B 4/6") ## works But I still cannot understand this. Regards, Yihui -- Yihui Xie Pho

Re: [Rd] Please explain your workflow from R code -> package -> R code -> package

2011-09-10 Thread Yihui Xie
. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Sep 10, 2011 at 11:31 AM, Joshua Ulrich wrote: > On Sat, Sep 10, 2011 at 11:23 AM, steven mosher > wrote: >> All I need now i

Re: [Rd] MetaCran website v1.0.0-alpha

2015-05-26 Thread Yihui Xie
creating a new one from the CRAN package. I'm not sure how technically difficult it would be for you. Thanks for the wonderful work! Regards, Yihui -- Yihui Xie Web: http://yihui.name On Tue, May 26, 2015 at 2:45 AM, Gábor Csárdi wrote: > On Mon, May 25, 2015 at 8:28 PM, Simon Urbanek

Re: [Rd] Warn on partial matches in R CMD check

2016-01-20 Thread Yihui Xie
+1 "What you write is **probably** what you get" sounds like a very bad idea to me. The real solution to laziness should be auto-completion instead of partial matching. Regards, Yihui On Wed, Jan 20, 2016 at 4:13 PM, Hadley Wickham wrote: > Hi all (but especially Kurt), > > Would it be possible

[Rd] Suppress LaTeX log during R CMD build

2016-08-11 Thread Yihui Xie
ic/texmf-dist/tex/latex/base/book.cls Document Class: book 2014/09/29 v1.4h Standard LaTeX document class (/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/bk10.clo)) (/Library/Frameworks/R.framework/Resources/share/texmf/tex/latex/Rd.sty Regards, Yihui -- Yihui Xie Web:

[Rd] Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R

2017-02-20 Thread Yihui Xie
Hi, I wonder if this is expected or I'm doing a wrong thing. pdf() dev.control('enable') library("grid") plot(1) grid.text("A") res = recordPlot() dev.off() cairo_pdf() replayPlot(res) dev.off() *** caught segfault *** address 0x4, cause 'memory not mapped' > sessionInfo() R version 3.3.2

Re: [Rd] Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R

2017-02-20 Thread Yihui Xie
ordPlot() dev.off() cairo_pdf() replayPlot(res) dev.off() Regards, Yihui -- https://yihui.name On Mon, Feb 20, 2017 at 10:24 AM, Yihui Xie wrote: > Hi, > > I wonder if this is expected or I'm doing a wrong thing. > > pdf() > dev.control('enable') > > librar

Re: [Rd] [FORGED] Re: Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R

2017-02-21 Thread Yihui Xie
t initialising a Cairo >> surface at device startup. >> >> If anyone who knows more about Cairo (or cairo_pdf()) wants to point out >> a good reason for the way cairo_pdf() currently works, please don't hold >> back. >> >> Paul >> >> On 21

Re: [Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?

2017-06-16 Thread Yihui Xie
Yeah, that was what I heard from our instructor when I was a graduate student: L stands for Long (integer). Regards, Yihui -- https://yihui.name On Fri, Jun 16, 2017 at 11:00 AM, Serguei Sokol wrote: > Le 16/06/2017 à 17:54, Henrik Bengtsson a écrit : >> >> I'm just curious (no complaints), wha

Re: [Rd] Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?

2020-06-21 Thread Yihui Xie
Hi Tomas, I received a report about R 4.0.0 in the knitr package (https://github.com/yihui/knitr/issues/1840), and I think it is related to the issue here. I created a minimal reproducible example below: owd = setwd(tempdir()) z = 'K\u00e4sch.txt' file.create(z) list.files() file.exists(list.file

Re: [Rd] Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?

2020-06-23 Thread Yihui Xie
quires all packages and libraries to be rebuilt from source. > More details on my blog, also there is experimental build of R > (installer) and experimental toolchain available: > https://developer.r-project.org/Blog/public/2020/05/02/utf-8-support-on-windows/index.html > > Best > Tomas

Re: [Rd] New URL redirect checks

2020-09-17 Thread Yihui Xie
I don't have an opinion on the URL shorteners, but how about the original question? Redirection can be extremely useful in general. Shortening URLs is only one of its possible applications. FWIW, CRAN uses (303) redirect itself, e.g., https://cran.r-project.org/package=MASS is redirected to https:/

Re: [Rd] New URL redirect checks

2020-09-22 Thread Yihui Xie
} tag anymore. > > Kevin > > > On Thu, Sep 17, 2020 at 8:32 AM Yihui Xie wrote: >> >> I don't have an opinion on the URL shorteners, but how about the >> original question? Redirection can be extremely useful in general. >> Shortening URLs is only o

Re: [Rd] Undocumented change of dirname("C:/") on R-devel on Windows

2023-02-27 Thread Yihui Xie
Hi Tomas, There has been an R CMD check error with xfun and r-devel on Windows for a while: https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/xfun-00check.html Basically it means that the following would return TRUE before: normalizePath('a/b', mustWork = FALSE) == normalizePath('.

Re: [Rd] Undocumented change of dirname("C:/") on R-devel on Windows

2023-03-07 Thread Yihui Xie
Thanks a lot! I can confirm that it has been fixed indeed. Regards, Yihui On Mon, Feb 27, 2023 at 1:14 PM Tomas Kalibera wrote: > > On 2/27/23 17:02, Yihui Xie wrote: > > Hi Tomas, > > There has been an R CMD check error with xfun and r-devel on Windows for a > w

Re: [Rd] R-4.3 version list.files function could not work correctly in chinese

2023-08-11 Thread Yihui Xie
r link that list.files() ends up skipping some > Chinese filenames in R-4.3.1 (but not R-4.2.2) on Windows, but would you > (or perhaps Yihui Xie who I see is also participating in the discussion) > mind translating the rest of your findings into English? Have you been > able to narrow d

[Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
Hi, It may have been so for 20+ years but I just discovered today that system() would always try to use the short path of a command on Windows: https://github.com/wch/r-source/blob/635a67/src/gnuwin32/run.c#L141 If that's true, I wonder if it could provide an option to disable this behavior, becau

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
rs). BTW, shell('fmtutil-sys --all') works fine. Regards, Yihui -- https://yihui.org On Mon, Oct 30, 2023 at 12:34 PM Tomas Kalibera wrote: > > On 10/30/23 17:18, Yihui Xie wrote: > > Hi, > > > > It may have been so for 20+ years but I just discovered

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-30 Thread Yihui Xie
h would work in system() today. If it still would not work because today's Windows is still like Windows 95 in this aspect, please ignore my question and I will ask Microsoft for a refund. Regards, Yihui On Mon, Oct 30, 2023 at 3:03 PM Prof Brian Ripley wrote: > > On 30/10/2023 16:1

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-10-31 Thread Yihui Xie
R's system() has to use short paths, I will resort to workarounds. Many thanks again! Regards, Yihui On Tue, Oct 31, 2023 at 4:22 AM Tomas Kalibera wrote: > > On 10/30/23 21:36, Yihui Xie wrote: > > I have read about "system() not using a shell on Windows" on the he

Re: [Rd] system()/system2() using short paths of commands on Windows?

2023-11-17 Thread Yihui Xie
wrote: > > > On 10/31/23 10:05, Duncan Murdoch wrote: > > On 31/10/2023 4:32 a.m., Tomas Kalibera wrote: > >> > >> On 10/30/23 19:07, Yihui Xie wrote: > >>> Sure. I'm not sure if it's possible to make it easier to reproduce, > >>

[Rd] should the text for RIGHT_ASSIGN be -> in getParseData()?

2013-07-05 Thread Yihui Xie
9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base Regards, Yihui -- Yihui Xie Phone: 206-667-4385 Web: http://yihui.name

Re: [Rd] SweaveParseOptions, quoted commas, and knitr vignettes

2013-07-16 Thread Yihui Xie
R will emit an error that knitr was not installed, which can be more helpful for the users to realize the real problem. Regards, Yihui -- Yihui Xie Phone: 206-667-4385 Web: http://yihui.name Fred Hutchinson Cancer Research Center, Seattle On Tue, Jul 16, 2013 at 7:34 PM, Ben Bolker wrote: >

[Rd] legitimate use of :::

2013-08-21 Thread Yihui Xie
authors about these internal functions since I'm the only author and I know clearly what I'm doing, and I want to avoid copying and pasting the code across packages just to avoid the NOTE in R CMD check. What should I do in this case? Regards, Yihui -- Yihui Xie Web: http://yihui.name Dep

Re: [Rd] legitimate use of :::

2013-08-22 Thread Yihui Xie
r63654 has fixed this particular issue, and R-devel will no longer warn against the use of ::: on packages of the same maintainer. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 102 Snedecor Hall, Ames, IA On Thu, Aug 22, 2013 at 6:45 AM, Uwe

Re: [Rd] legitimate use of :::

2013-08-22 Thread Yihui Xie
d functions. I believe there are other legitimate reasons for :::, which might make it difficult for R to cover all these cases, and also bring additional communications between package authors and CRAN. In conclusion, R CMD check cannot really stop :::, and ::: can be there for good reasons, so h

Re: [Rd] packages with Sweave and knitr vignettes?

2013-08-23 Thread Yihui Xie
, and knitr itself also uses knitr to build LaTeX, HTML, and Markdown vignettes. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 102 Snedecor Hall, Ames, IA On Fri, Aug 23, 2013 at 4:49 PM, Henrik Bengtsson wrote: > On Fri, Aug 23, 2013 at 1:24

Re: [Rd] legitimate use of :::

2013-08-25 Thread Yihui Xie
hor. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 102 Snedecor Hall, Ames, IA On Fri, Aug 23, 2013 at 11:05 AM, Duncan Murdoch wrote: > On 13-08-22 11:54 PM, Yihui Xie wrote: >> >> Maybe it is not a good idea for R CMD check to

Re: [Rd] ‘:::’ call

2013-08-28 Thread Yihui Xie
is a part of what CRAN does. In God we trust, and everyone else should bring tests. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Aug 28, 2013 at 1:50 PM, Paul Gilbert wrote: > On 13-08-28 12:29 PM, Marc

Re: [Rd] declaring package dependencies

2013-09-15 Thread Yihui Xie
ant to emphasize one final point: requests from package authors do not necessarily mean more work for CRAN. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Sep 15, 2013 at 6:11 PM, Ben Bolker wr

[Rd] getParseData() for imaginary numbers

2013-09-18 Thread Yihui Xie
=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base Reg

Re: [Rd] Error in "Writing R Extensions"

2013-10-02 Thread Yihui Xie
ntax, encoding = "", quiet = FALSE, ...) $ tangle :function (file, driver, syntax, encoding = "", quiet = FALSE, ...) I admit the engine name "knitr" is also confusing. There are other engine names in knitr, though. For example, knitr::docco_classic http://cran.r-pro

Re: [Rd] user defined macros in Rd files

2013-10-09 Thread Yihui Xie
+1. As an example, there are 91 instances of \newcommand{\CRANpkg} in R source, and this number is still growing as I see: $ grep "newcommand{CRANpkg}" -r . | wc 91 91 10317 Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State

Re: [Rd] user defined macros in Rd files

2013-10-09 Thread Yihui Xie
the package author can define these macros in one place, and use them in his/her package. When we have to copy and paste a macro 91 times, it seems to have defeated the purpose of a macro. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215

[Rd] png(type='cairo'): point symbols without boarders are not anti-aliased?

2013-10-21 Thread Yihui Xie
tcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE TRUEFALSE TRUE TRUE libxml fifo clediticonv NLS profmemcairo TRUE TRUE TRUE TRUE TRUE TRUE TRUE Regards, Yihui -- Yihui Xie Web: http://yihui.name Department

Re: [Rd] png(type='cairo'): point symbols without boarders are not anti-aliased?

2013-10-21 Thread Yihui Xie
Sorry, typo in the subject: I mean "borders". Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Oct 21, 2013 at 4:43 PM, Yihui Xie wrote: > Hi, > > It seems that anti-aliasing in png(typ

Re: [Rd] png(type='cairo'): point symbols without boarders are not anti-aliased?

2013-10-21 Thread Yihui Xie
png-base.png', type = 'cairo') f(Cairo::CairoPNG, 'png-Cairo.png') Thanks! Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Oct 21, 2013 at 5:28 PM, Paul Murrell wrote: > H

Re: [Rd] png(type='cairo'): point symbols without boarders are not anti-aliased?

2013-10-22 Thread Yihui Xie
Thanks for the hints! I was originally wondering the difference between grDevices::png(type='cairo') and Cairo::CairoPNG() for the case pch=16, a solid point without border. Cairo does a nice job for such point symbols, but png() renders them very poorly. Regards, Yihui -- Yihui Xie

Re: [Rd] R CMD check problem with R 3.0.2

2013-10-25 Thread Yihui Xie
, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Oct 25, 2013 at 10:37 AM, Sanford Weisberg wrote: > Using SUSE Linux, Windows 32 bit and Windows 64 bit R 3.0.2 , I am unable > to use R CMD check successfully. Here

Re: [Rd] appropriate work-around for problems with a specific plot device (Rstudio)?

2013-10-25 Thread Yihui Xie
not always reliable. I'm not sure if grDevices::quartz, grDevices::x11, and grDevices::windows can "fix" the NOTE. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Oct 25, 2013 at 9:24 AM, Loren

Re: [Rd] R CMD check problem with R 3.0.2

2013-10-28 Thread Yihui Xie
machines any more. For now, I think either `R CMD check --build` (must build before checking) or `R CMD check --force` (definitely check without building) sounds like a reasonable solution. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Yihui Xie
Yes, that indeed sounds like a problem, but example(txtProgressBar), which is based on \r, works well in the RStudio console. Anyway, thanks for all the experiments, and (to Renaud) support.rstudio.org is the place to report such problems. Regards, Yihui -- Yihui Xie Web: http://yihui.name

[Rd] Format an empty data frame

2014-01-24 Thread Yihui Xie
utils datasets methods base Regards, Yihui -- Yihui Xie Web: http://yihui.name __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Where to put package vignettes

2014-02-20 Thread Yihui Xie
ttp://yihui.name/knitr/demo/vignette/ If you still cannot work it out, please point us to the source of your package. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Thu, Feb 20, 2014 at 8:43 AM, wrote: > Dear Søren, > > Thank you very much for your answer, it solved my proble

Re: [Rd] Package vignettes share the same environment?

2014-04-05 Thread Yihui Xie
ere are other things shared in the same session such as options(). I guess the cleanest way is still to start new R sessions. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Sat, Apr 5, 2014 at 3:04 PM, Duncan Murdoch wrote: > On 05/04/2014, 2:24 PM, Martin Morgan wrote: >> >

Re: [Rd] Can the output of Sys.getenv() be improved?

2014-04-18 Thread Yihui Xie
For your first question, try str(as.list(Sys.getenv())). I do not know the answer for the JAGS question, and I'll leave it to someone else to tell you which mailing list to use for such questions... Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, Apr 18, 2014 at 11:38 AM, Zhan

[Rd] The regular expressions in compareVersion()

2014-04-24 Thread Yihui Xie
ut the fix was immediately reverted for some reason: https://github.com/wch/r-source/commit/52b0a46e15136a7f9e4777e9960fdda6d84880c0 Regards, Yihui -- Yihui Xie Web: http://yihui.name __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] The regular expressions in compareVersion()

2014-04-24 Thread Yihui Xie
please see here for a record: http://r.789695.n4.nabble.com/Sweave-printing-an-underscore-in-the-output-from-an-R-command-td4675177.html As I said, it is a similar problem: someone tried to escape a character that did not need to be escaped in []. Regards, Yihui -- Yihui Xie Web: http://yihui.name

[Rd] Bug in read.dcf(all = TRUE)?

2014-05-14 Thread Yihui Xie
DDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.1.0 Regards, Yihui -- Yihui Xie Web: http://yihui.name

Re: [Rd] Bug in read.dcf(all = TRUE)?

2014-05-16 Thread Yihui Xie
quot;, lc_ctype), add = TRUE) Sys.setlocale("LC_CTYPE", "C") although I do not really understand why LC_CTYPE has to be changed to "C". Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, May 14, 2014 at 4:34 PM, Yihui Xie wrote: > Hi, > >

Re: [Rd] Latex errors (build on windows)

2014-05-24 Thread Yihui Xie
need sleep. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Sat, May 24, 2014 at 7:19 AM, Hualei Kong wrote: > Dear Prof Brian Ripley: > I am very sorry for that I use the unappropriate words "It's my great > pleasure" when I read this mail again!

[Rd] R CMD check for the R code from vignettes

2014-05-29 Thread Yihui Xie
but perhaps I missed something here, and I'd like to hear what other people think about it. Regards, Yihui -- Yihui Xie Web: http://yihui.name __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R CMD check for the R code from vignettes

2014-05-30 Thread Yihui Xie
enrik's idea, i.e., to provide vignette engines that just ignore tangle. At the moment, it seems R CMD check is comfortable with vignettes that do not have corresponding R scripts, and I hope these R scripts will not become mandatory in the future. Thanks everyone for your comments! Reg

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Yihui Xie
Note the test has been done once in weave, since R CMD check will try to rebuild vignettes. The problem is whether the related tools in R should change their tangle utilities so we can **repeat** the test, and it seems the answer is "no" in my eyes. Regards, Yihui -- Yihui Xie

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Yihui Xie
e? We lose an R script as a derivative from the source document, but we do not lose the code evaluation. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Sat, May 31, 2014 at 6:20 PM, Martin Morgan wrote: > On 05/31/2014 03:52 PM, Yihui Xie wrote: >> >> Note the test has been d

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Yihui Xie
onal_, i.e. package authors can _choose_ whether they want to disable tangle. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Sat, May 31, 2014 at 9:11 PM, Kasper Daniel Hansen wrote: > The Bioconductor project has a substantial amount of teaching material in > the form of Sweave file

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Yihui Xie
ngle for R package vignettes? Sorry if I did not make it clear enough, my priority of this discussion is the necessity of tangle for package vignettes. After we finish this issue, I'll be happy to extend the discussion towards tangle in general. Regards, Yihui -- Yihui Xie Web: http://yihui.nam

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Yihui Xie
dgment is subjective). Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Jun 2, 2014 at 10:19 AM, Paul Gilbert wrote: > > > On 06/02/2014 12:16 AM, Gabriel Becker wrote: >> >> Carl, >> >> I don't really have a horse in this race other than a stro

Re: [Rd] R CMD check for the R code from vignettes -- thread fraying?

2014-06-02 Thread Yihui Xie
I asked the same question privately yesterday since I did not receive it or find it in the archive, and it turned out he sent an off-line reply. I'm replying publicly just to avoid further confusion, and sorry to spam all in the list. Regards, Yihui -- Yihui Xie Web: http://yihui.name O

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Yihui Xie
computation using the tangled code. My conclusion: Is tangle useful? Yes. Must we tangle package vignettes? Perhaps no. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Jun 2, 2014 at 12:44 PM, Duncan Murdoch wrote: > On 03/06/2014, 12:58 AM, Yihui Xie wrote: >> >> Y

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Yihui Xie
nce again, thanks everyone for your perspectives! Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Jun 2, 2014 at 9:18 PM, Kevin Coombes wrote: > "Doc, it hurts when I do this." > "So, don't do that." > > If no one in R Core does anything about this

[Rd] Package keyval Error: noupquote undefined

2014-06-04 Thread Yihui Xie
XLive 2012 and Ubuntu 12.04. I went through the R-admin manual, and I did not seem to find a requirement of the TeXLive version there. Here is a minimal foo.Rd that shows the problem when running `Rd CMD Rd2pdf foo.Rd`: \name{foo} \alias{foo} \title{Foo} \description{ Bar. } Regards, Yihui -

Re: [Rd] Package keyval Error: noupquote undefined

2014-06-09 Thread Yihui Xie
to write a homemade version of upquote in Rd.sty... Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, Jun 4, 2014 at 1:18 PM, Yihui Xie wrote: > Hi, > > Due to a change in Rd.sty a few days ago > (https://github.com/wch/r-source/commit/620eb9a#diff-3bf3d821c6faae50cd6ec

Re: [Rd] R CMD check warning with S3 method

2014-06-19 Thread Yihui Xie
anual? Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, Jun 20, 2014 at 12:19 AM, Winston Chang wrote: > On Thu, Jun 19, 2014 at 3:15 PM, Martyn Plummer wrote: > >> Export filter in the NAMESPACE file *without copying it* in the R source >> code. >>

Re: [Rd] user defined macros in Rd files

2014-06-27 Thread Yihui Xie
Hi Duncan, Thanks a lot for eventually implementing this and making the Rd world greener! https://github.com/wch/r-source/commit/ff3ea81ae87 Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, Oct 9, 2013 at 3:55 PM, Duncan Murdoch wrote: > On 13-10-09 4:34 PM, Yihui Xie wr

Re: [Rd] R CMD check warning with S3 method

2014-06-27 Thread Yihui Xie
is attached because A will also be at least attached. Then it will be perfect if `R CMD check` can stop warning against the missing documentation, which is not really missing. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, Jun 20, 2014 at 1:34 AM, Yihui Xie wrote: > but note t

[Rd] Byte Order Mark in ?connections

2014-07-22 Thread Yihui Xie
Raw('\UFEFF') [1] ef bb bf Regards, Yihui -- Yihui Xie Web: http://yihui.name __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Parsing and deparsing of escaped unicode characters

2014-08-03 Thread Yihui Xie
_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252" > x [1] "I like 寿司" > deparse(x) [1] "\"I like \"" Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Jul 28, 2014 at 4:47 AM, Je

Re: [Rd] Why R-project source code is not on Github

2014-08-21 Thread Yihui Xie
typos. I cannot think of anything else that is more efficient than being able to discuss the patch right in the lines of diff's. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Thu, Aug 21, 2014 at 10:58 AM, Simon Urbanek wrote: > > On Aug 21, 2014, at 6:40 AM, Marc Schwartz wr

Re: [Rd] timings for examples in R CMD check

2014-09-03 Thread Yihui Xie
I did not really try it, but perhaps setting _R_CHECK_TIMINGS_=false in your ~/.Renviron works? http://cran.rstudio.com/doc/manuals/r-release/R-ints.html#Tools Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, Sep 3, 2014 at 2:58 PM, Brian G. Peterson wrote: > I'm having a v

  1   2   >