Re: [Rd] Check R version dependency in R CMD Check

2024-12-13 Thread Yihui Xie
For package authors using Github Action, one reason why they forget to actually check their packages against the minimal R version specified in DESCRIPTION may be the use of _relative_ versions in the workflows like this: https://github.com/r-lib/actions/blob/v2/examples/check-full.yaml i.e., check

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, > >>

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-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-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

[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] 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

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] 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] 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] 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] 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] 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] [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] 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] 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] 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] 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

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] 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] 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] 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] [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] 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

[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

[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:

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

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] NEWS.md support on CRAN

2015-05-24 Thread Yihui Xie
That is more or less what I had been doing for a long time (having both NEWS.md and NEWS), but decided not to do it any more last year. In fact, you can easily convert NEWS.md to a NEWS file that R's news() can understand, e.g. https://github.com/yihui/knitr/blob/947ad5fc94/Makefile#L8-L10 (if your

Re: [Rd] NEWS.md support on CRAN

2015-05-23 Thread Yihui Xie
.md file, and it has been removed from the tarball to make R CMD check happy. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Sat, May 23, 2015 at 8:25 AM, Gábor Csárdi wrote: > On Sat, May 23, 2015 at 8:14 AM, Duncan Murdoch > wrote: > [...] > >> I think the harder pr

Re: [Rd] NEWS.md support on CRAN

2015-05-22 Thread Yihui Xie
What I do is to use inst/NEWS.Rd as a placeholder that points to the NEWS.md on Github, e.g. http://cran.rstudio.com/web/packages/knitr/index.html Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, May 22, 2015 at 8:08 PM, Duncan Murdoch wrote: > On 22/05/2015 8:49 PM, Iman

Re: [Rd] How best to get around shadowing of executables by system()'s prepending of directories to Windows' PATH?

2015-05-18 Thread Yihui Xie
+1 I have exactly the same problem. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, May 18, 2015 at 12:29 PM, Josh O'Brien wrote: > My question: > > On Windows, R's system() command prepends several directories to those > in the Windows Path variable. > >

Re: [Rd] UTF8 markdown vignette

2014-12-17 Thread Yihui Xie
original problem, but apparently the former one is the ideal fix. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, Dec 10, 2014 at 6:19 AM, Duncan Murdoch wrote: > On 09/12/2014, 10:36 PM, Yihui Xie wrote: >> I took a look at the R source and I realized that the enc

Re: [Rd] UTF8 markdown vignette

2014-12-09 Thread Yihui Xie
-- Yihui Xie Web: http://yihui.name On Tue, Dec 9, 2014 at 3:42 PM, Duncan Murdoch wrote: > On 09/12/2014, 4:38 PM, ONKELINX, Thierry wrote: >> Dear Yihui, >> >> I have created a reproducible example at >> https://github.com/ThierryO/utf8vignette >> &g

Re: [Rd] UTF8 markdown vignette

2014-12-09 Thread Yihui Xie
Thanks for the kind words. Actually we have more ambitious plans than just reverse search :) Regards, Yihui -- Yihui Xie Web: http://yihui.name On Tue, Dec 9, 2014 at 11:18 AM, Duncan Murdoch wrote: > On 09/12/2014 11:13 AM, Yihui Xie wrote: >> >> Lastly, the most imp

Re: [Rd] UTF8 markdown vignette

2014-12-09 Thread Yihui Xie
nimal reproducible example, either. Without these information, I can only guess blindly. BTW, you may also try HTML vignettes instead, which is much much easier to get right than LaTeX in terms of character encodings. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Tue, Dec 9, 2014 at 7:05 AM

Re: [Rd] Use of tools:::httpdPort in a package for CRAN.

2014-12-05 Thread Yihui Xie
Perhaps I missed something, but isn't this just a one-liner function? help.index = function (pkg) help(package = (pkg), help_type = "html") Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, Dec 5, 2014 at 10:24 AM, Sven E. Templer wrote: > Hello, > > I wrot

Re: [Rd] Changing style for the Sweave vignettes

2014-11-13 Thread Yihui Xie
I think HTML is more reliable in this respect ( is more faithful), and this is one of the reasons that I'm in favor of HTML vignettes instead of PDF when I do not care that much about precise typesetting (which is not always the most important thing). Regards, Yihui -- Yihui Xie Web: http://yihui.na

Re: [Rd] Pkg creation: Sweave: multiple files vignette: Error in R CMD check

2014-11-06 Thread Yihui Xie
ut it under the root directory vignettes/ (it should be fine if it is under a sub directory). Regards, Yihui -- Yihui Xie Web: http://yihui.name On Thu, Nov 6, 2014 at 8:44 AM, wrote: > Hello R-developers! > > First I want to thank Duncan, Sean and Ben (off-list-communication) for your &g

Re: [Rd] formatR 1.0 caused error

2014-09-18 Thread Yihui Xie
nInfo() but it seems you deleted an important part: the versions of packages, which makes it even more difficult for others to tell what the problem could possibly be. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Thu, Sep 18, 2014 at 1:07 PM, Zhang,Jun wrote: > Recently in our R 3.1.0 i

Re: [Rd] r wiki

2014-09-08 Thread Yihui Xie
maintaining the content. Let the professionals do the hosting and compilation service, and my life has become so much better (no more worries about security holes and attacks). Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Sep 8, 2014 at 12:10 PM, Philippe GROSJEAN wrote: > Uwe and

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

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] 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

[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] 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

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-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] 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

[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] 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

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 -- 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
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

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-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
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
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-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

[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] 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!

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, > >

[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] 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] 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] 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

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] 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

[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] 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

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] 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-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] 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] 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-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

[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] 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

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] 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

[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] 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

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] 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] 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-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] 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

[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] 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] 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] Patch proposal for R style consistency (concerning deparse.c)

2013-04-18 Thread Yihui Xie
I second the change of "} else {". Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Apr 18, 2013 at 11:16 AM, Paul Johnson wrote: > OK, I concede that. > > Now

[Rd] localeToCharset() returns NA for the Hong Kong locale

2013-04-10 Thread Yihui Xie
length(x) == 2 when the locale string is split by ., since in this case the dots in S.A.R. have a different meaning (abbrev for Special Administrative Region). I would suggest check if length(x) >= 2 and use the last element of x. Maybe you have good reasons to require length(x) == 2. Regard

[Rd] savePlot() under Windows

2013-04-08 Thread Yihui Xie
kages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.0.0 Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University

Re: [Rd] missing exported methods when compiling vignettes in R 3.0.0 RC

2013-04-01 Thread Yihui Xie
nette builder. Now I have forced the evaluation to be in the global environment, and pushed the changes to the knitr development version on Github: https://github.com/yihui/knitr Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University

Re: [Rd] the case of building R snapshot without svn nor network connection.

2013-03-16 Thread Yihui Xie
"the only place for it is /dev/null" --> hi Achim, I bet this is a nice fortune candidate :) 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, Mar 16, 2013 at 9:39 AM, Simon U

[Rd] Why cannot `Rscript -e` accept an empty line?

2013-03-09 Thread Yihui Xie
64 x86_64 GNU/Linux Similar problem under Windows: Rscript -e "1" -e "" -e "2" [1] 1 Error: object 'e' not found Execution halted I can certainly save the code in a script and run Rscript foo.R, but I'm curious why Rscript stops when the -e argument i

Re: [Rd] enabling reproducible research & R package management & install.package.version & BiocLite

2013-03-04 Thread Yihui Xie
ng a software package? (in the context of computing) Probably not. Long live the reproducible research! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Mar 4, 2013 at 3:13 PM, Cook, Malcolm

Re: [Rd] CRAN task views: markdown? better .CSS?

2013-01-31 Thread Yihui Xie
See this page by Barry Rowlingson: https://stat.ethz.ch/pipermail/r-devel/2012-February/063338.html Given that CRAN maintainers do not even use JavaScript, I bet CSS does not matter either; plain text is plain good. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name

Re: [Rd] Bug in R CMD check for \ in Rd?

2013-01-04 Thread Yihui Xie
/knitr/blob/bf793ca67ac6b78a5b09ab8eb08976ec7667e6e2/man/knit_expand.Rd https://github.com/yihui/knitr/blob/bf793ca67ac6b78a5b09ab8eb08976ec7667e6e2/R/template.R Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall

[Rd] Bug in R CMD check for \ in Rd?

2013-01-03 Thread Yihui Xie
not need to be escaped, so the only character to escape in this case is the backslash. The text/html help page rendered from my Rd shows "\\{\\{((.|\n)+?)\\}\\}" correctly. So I'm wondering if this is a bug of R CMD check, or I misunderstood anything. Thanks! Regards, Yihui -- Yihui Xie

  1   2   >