Re: [Rd] URL checks

2021-01-07 Thread Kirill Müller via R-devel
One other failure mode: SSL certificates trusted by browsers that are not installed on the check machine, e.g. the "GEANT Vereniging" certificate from https://relational.fit.cvut.cz/ . K On 07.01.21 12:14, Kirill Müller via R-devel wrote: Hi The URL checks in R CMD check test

[Rd] URL checks

2021-01-07 Thread Kirill Müller via R-devel
Hi The URL checks in R CMD check test all links in the README and vignettes for broken or redirected links. In many cases this improves documentation, I see problems with this approach which I have detailed below. I'm writing to this mailing list because I think the change needs to happen

[Rd] Profiling: attributing costs to place of invocation (instead of place of evaluation)?

2020-02-26 Thread Kirill Müller
Hi Consider the following example: f <- function(expr) g(expr) g <- function(expr) {   h(expr) } h <- function(expr) {   expr # evaluation happens here   i(expr) } i <- function(expr) {   expr # already evaluated, no costs here   invisible() } rprof <- tempfile() Rprof(rprof) f(replicate(1e2,

r-devel@r-project.org

2019-08-19 Thread Kirill Müller
Hi everyone The following behavior (in R 3.6.1 and R-devel r77040) caught me by surprise today: truthy <- c(TRUE, FALSE) falsy <- c(FALSE, TRUE, FALSE) if (truthy) "check" #> Warning in if (truthy) "check": the condition has length > 1 and only the #> first element will be used #> [1] "check

[Rd] Ellipsis and dot-dot-number [Re: Dots are not fixed by make.names()]

2019-03-08 Thread Kirill Müller
context, no ... to look in `..13` #> Error: ..13 used in an incorrect context, no ... to look in `...` #> Error in eval(expr, envir, enclos): '...' used in an incorrect context Does the ?Reserved help page need to mention this oddity, or link to more detailed documentation? Best re

Re: [Rd] bias issue in sample() (PR 17494)

2019-02-26 Thread Kirill Müller
02.19 10:18, Ralf Stubner wrote: Kirill, I think some level of collision is actually expected! R uses a 32bit MT that can produce 2^32 different doubles. The probability for a collision within a million draws is pbirthday(1e6, classes = 2^32) [1] 1 Greetings Ralf On 26.02.19 07:06, Kirill M

Re: [Rd] bias issue in sample() (PR 17494)

2019-02-25 Thread Kirill Müller
Gabe As mentioned on Twitter, I think the following behavior should be fixed as part of the upcoming changes: R.version.string ## [1] "R Under development (unstable) (2019-02-25 r76160)" .Machine$double.digits ## [1] 53 set.seed(123) RNGkind() ## [1] "Mersenne-Twister" "Inversion"    "Rej

[Rd] Dots are not fixed by make.names()

2018-10-05 Thread Kirill Müller
Hi It seems that names of the form "..#" and "..." are not fixed by make.names(), even though they are reserved words. The documentation reads: > [...] Names such as ".2way" are not valid, and neither are the reserved words. > Reserved words in R: [...] ... and ..1, ..2 etc, which are used

Re: [Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-09 Thread Kirill Müller
On 09.06.2017 13:23, Martin Maechler wrote: Kirill Müller on Thu, 8 Jun 2017 12:55:26 +0200 writes: > On 06.06.2017 22:14, Kirill Müller wrote: >> >> >> On 06.06.2017 10:07, Martin Maechler wrote: >>>>>>>> Kirill Müll

Re: [Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-08 Thread Kirill Müller
On 06.06.2017 22:14, Kirill Müller wrote: On 06.06.2017 10:07, Martin Maechler wrote: Kirill Müller on Mon, 5 Jun 2017 17:30:20 +0200 writes: > Hi I've noted a minor inconsistency in the documentation: > Current R-exts reads > s = PROTECT_WITH_INDEX(eval(O

Re: [Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-06 Thread Kirill Müller
On 06.06.2017 10:07, Martin Maechler wrote: Kirill Müller on Mon, 5 Jun 2017 17:30:20 +0200 writes: > Hi I've noted a minor inconsistency in the documentation: > Current R-exts reads > s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx);

[Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-05 Thread Kirill Müller
Hi I've noted a minor inconsistency in the documentation: Current R-exts reads s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx); but I believe it has to be PROTECT_WITH_INDEX(s = eval(OS->R_fcall, OS->R_env), &ipx); because PROTECT_WITH_INDEX() returns void. Best regards Kirill

Re: [Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Kirill Müller
On 09.05.2017 13:19, Duncan Murdoch wrote: On 09/05/2017 3:42 AM, Kirill Müller wrote: Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stop

[Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Kirill Müller
Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stops with an error, the parse() function reencodes all foreign characters using the notation. I have add

Re: [Rd] Upgrading a package to which other packages are LinkingTo

2016-12-16 Thread Kirill Müller
Thanks for discussing this. On 16.12.2016 17:19, Dirk Eddelbuettel wrote: On 16 December 2016 at 11:00, Duncan Murdoch wrote: | On 16/12/2016 10:40 AM, Dirk Eddelbuettel wrote: | > On 16 December 2016 at 10:14, Duncan Murdoch wrote: | > | On 16/12/2016 8:37 AM, Dirk Eddelbuettel wrote: | > | > |

[Rd] Upgrading a package to which other packages are LinkingTo

2016-12-16 Thread Kirill Müller
Hi I'd like to suggest to make R more informative when a user updates a package A where there's at least one package B that has "LinkingTo: A" in its description. To illustrate the problem, assume package A is updated so that its C/C++ header interface (in inst/include) is changed. For pack

Re: [Rd] withAutoprint({ .... }) ?

2016-09-27 Thread Kirill Müller
On 25.09.2016 18:29, Martin Maechler wrote: I'm now committing my version (including (somewhat incomplete) documentation, so you (all) can look at it and try / test it further. Thanks, that's awesome. Is `withAutoprint()` recursive? How about calling the new function in `example()` (instead of `

Re: [Rd] withAutoprint({ .... }) ?

2016-09-02 Thread Kirill Müller
On 02.09.2016 14:38, Duncan Murdoch wrote: On 02/09/2016 7:56 AM, Martin Maechler wrote: On R-help, with subject '[R] source() does not include added code' Joshua Ulrich on Wed, 31 Aug 2016 10:35:01 -0500 writes: > I have quantstrat installed and it works fine for me. If you're

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-13 Thread Kirill Müller
On 12.05.2016 09:51, Martin Maechler wrote: > My ulimit package exposes this API ([1], should finally submit it to > CRAN); unfortunately this very API seems to be unsupported on OS X > [2,3]. Last time I looked into it, neither of the documented settings > achieved the desire

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-11 Thread Kirill Müller
My ulimit package exposes this API ([1], should finally submit it to CRAN); unfortunately this very API seems to be unsupported on OS X [2,3]. Last time I looked into it, neither of the documented settings achieved the desired effect. -Kirill [1] http://krlmlr.github.io/ulimit [2] http://s

[Rd] Regression in match() in R 3.3.0 when matching strings with different character encodings

2016-05-09 Thread Kirill Müller
Hi I think the following behavior is a regression from R 3.2.5: > match(iconv( c("\u00f8", "A"), from = "UTF8", to = "latin1" ), "\u00f8") [1] 1 NA > match(iconv( c("\u00f8"), from = "UTF8", to = "latin1" ), "\u00f8") [1] NA > match(iconv( c("\u00f8"), from = "UTF8", to = "latin1" ), "

Re: [Rd] S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment

2016-04-18 Thread Kirill Müller
x27;t happen immediately. For now, the S4_extends() should probably throw an error when the methods namespace is not loaded. And the check should be changed to directly check whether R_MethodsNamespace has been set to something other than the default (R_GlobalEnv). Agreed? On Mon, Apr 18, 2016 at

Re: [Rd] S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment

2016-04-18 Thread Kirill Müller
st', x); test.Matrix <- function(x) 'Hi'; test(Matrix::Matrix())" -Kirill On 19.04.2016 01:35, Kirill Müller wrote: Scenario: An S3 method is declared for an S4 base class but called for an instance of a derived class. Steps to reproduce: > Rscript -e "test &l

[Rd] S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment

2016-04-18 Thread Kirill Müller
Scenario: An S3 method is declared for an S4 base class but called for an instance of a derived class. Steps to reproduce: > Rscript -e "test <- function(x) UseMethod('test', x); test.Matrix <- function(x) 'Hi'; MatrixDispatchTest::test(Matrix::Matrix())" Error in UseMethod("test", x) : no

[Rd] DESCRIPTION file: Space after colon mandatory?

2016-03-29 Thread Kirill Müller
According to R-exts, DESCRIPTION is a DCF variant, and " Fields start with an ASCII name immediately followed by a colon: the value starts after the colon and a space." However, according to the linked https://www.debian.org/doc/debian-policy/ch-controlfields.html, horizontal space before and a

Re: [Rd] getParseData() for installed packages

2016-03-10 Thread Kirill Müller
On 10.03.2016 16:05, Duncan Murdoch wrote: On 10/03/2016 9:53 AM, Kirill Müller wrote: On 10.03.2016 15:49, Duncan Murdoch wrote: I install using R CMD INSTALL ., and I have options(keep.source = TRUE, keep.source.pkgs = TRUE) in my .Rprofile . The srcrefs are all there, it's just tha

Re: [Rd] getParseData() for installed packages

2016-03-10 Thread Kirill Müller
On 10.03.2016 15:49, Duncan Murdoch wrote: On 10/03/2016 8:27 AM, Kirill Müller wrote: I can't seem to reliably obtain parse data via getParseData() for functions from installed packages. The parse data seems to be available only for the *last* file in the package. See [1] for a

[Rd] getParseData() for installed packages

2016-03-10 Thread Kirill Müller
I can't seem to reliably obtain parse data via getParseData() for functions from installed packages. The parse data seems to be available only for the *last* file in the package. See [1] for a small example package with just two functions f and g in two files a.R and b.R. See [2] for a documen

[Rd] R CMD check --as-cran without qpdf

2015-10-10 Thread Kirill Müller
Today, a package that has an HTML vignette (but no PDF vignette) failed R CMD check --as-cran on a system without qpdf. I think the warning originates here [1], due to a premature check for the existence of qpdf [2]. Setting R_QPDF=true (as in /bin/true) helped, but perhaps it's possible to che

Re: [Rd] static pdf vignette

2015-02-27 Thread Kirill Müller
Perhaps the R.rsp package by Henrik Bengtsson [1,2] is an option. Cheers Kirill [1] http://cran.r-project.org/web/packages/R.rsp/index.html [2] https://github.com/HenrikBengtsson/R.rsp On 27.02.2015 02:44, Wang, Zhu wrote: Dear all, In my package I have a computational expensive Rnw file

Re: [Rd] xtabs and NA

2015-02-13 Thread Kirill Müller
On 09.02.2015 16:59, Gabor Grothendieck wrote: On Mon, Feb 9, 2015 at 8:52 AM, Kirill Müller wrote: Passing table the output of model.frame would still allow the use of a formula interface: mf <- model.frame( ~ data, na.action = na.pass) do.call("table", c(mf, useNA = "if

[Rd] xtabs and NA

2015-02-09 Thread Kirill Müller
Hi I haven't found a way to produce a tabulation from factor data with NA values using xtabs. Please find a minimal example below, it's also on R-pubs [1]. Tested with R 3.1.2 and R-devel r67720. It doesn't seem to be documented explicitly that it's not supported. From reading the code [2]

Re: [Rd] How to test impact of candidate changes to package?

2014-09-10 Thread Kirill Müller
If you don't intend to keep the old business logic in the long run, perhaps a version control system such as Git can help you. If you use it in single-user mode, you can think of it as a backup system where you manually create each snapshot and give it a name, but it actually can do much more.

Re: [Rd] Request to review a patch for rpart

2014-08-15 Thread Kirill Müller
el? Return a "tree" that always guesses the most common label, or doesn't guess at all (NA)? It doesn't seem like you'd need rpart for either of those. ~G On Wed, Aug 13, 2014 at 3:51 AM, Kirill Müller <mailto:kirill.muel...@ivt.baug.ethz.ch>> wrote:

[Rd] Request to review a patch for rpart

2014-08-13 Thread Kirill Müller
model, the files (based on the current CRAN release 4.1-8) can be downloaded from https://github.com/krlmlr/rpart/archive/empty-model.zip. Thanks for your attention. With kindest regards Kirill Müller __ R-devel@r-project.org mailing list https://st

[Rd] UTC time zone on Windows

2014-08-06 Thread Kirill Müller
Hi I'm having trouble running R CMD build and check with UTC time zone setting in Windows Server 2012. I can't seem to get rid of the following warning: unable to identify current timezone 'C': please set environment variable 'TZ' However, setting TZ to either "Europe/London" or "GMT Stan

Re: [Rd] NOTE when detecting mismatch in output, and codes for NOTEs, WARNINGs and ERRORs

2014-04-10 Thread Kirill Müller
On 03/26/2014 06:46 PM, Paul Gilbert wrote: On 03/26/2014 04:58 AM, Kirill Müller wrote: Dear list It is possible to store expected output for tests and examples. From the manual: "If tests has a subdirectory Examples containing a file pkg-Ex.Rout.save, this is compared to the output

[Rd] NOTE when detecting mismatch in output, and codes for NOTEs, WARNINGs and ERRORs

2014-03-26 Thread Kirill Müller
Dear list It is possible to store expected output for tests and examples. From the manual: "If tests has a subdirectory Examples containing a file pkg-Ex.Rout.save, this is compared to the output file for running the examples when the latter are checked." And, earlier (written in the context

Re: [Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN

2014-03-22 Thread Kirill Müller
On 03/22/2014 02:10 PM, Nathaniel Smith wrote: On 22 Mar 2014 12:38, "Philippe GROSJEAN" wrote: On 21 Mar 2014, at 20:21, Gábor Csárdi wrote: In my opinion it is somewhat cumbersome to use this for everyday work, although good virtualization software definitely helps. Gabor Additional i

[Rd] Deep copy of factor levels?

2014-03-17 Thread Kirill Müller
Hi It seems that selecting an element of a factor will copy its levels (Ubuntu 13.04, R 3.0.2). Below is the output of a script that creates a factor with 1 elements and then calls as.list() on it. The new object seems to use more than 700 MB, and inspection of the levels of the individu

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Kirill Müller
On 03/14/2014 03:54 PM, Simon Urbanek wrote: As far as R is concerned, the connection is open. In addition, pipes exist even without the process - you can close one end of a pipe and it will still exist (that’s what makes pipes useful, actually, because you can choose to close arbitrary combin

[Rd] Detect a terminated pipe

2014-03-14 Thread Kirill Müller
Hi Is there a way to detect that the process that corresponds to a pipe has ended? On my system (Ubuntu 13.04), I see > p <- pipe("true", "w"); Sys.sleep(1); system("ps -elf | grep true | grep -v grep"); isOpen(p) [1] TRUE The "true" process has long ended (as the filtered ps system call em

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-10 Thread Kirill Müller
On 02/11/2014 03:22 AM, Peter Meilstrup wrote: Because "depends" is treated incorrectly (if I may place a value judgement on it). I had an earlier thread on this, not sure if any changes have taken place since then: http://r.789695.n4.nabble.com/Dependencies-of-Imports-not-attached-td4666529.htm

[Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-10 Thread Kirill Müller
Hi Accesses the $new method for a class defined in a package fails if the methods package is not loaded. I have created a test package with the following single code file: newTest <- function() { cl <- get("someClass") cl$new } someClass <- setRefClass("someClass") (This is similar to

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Kirill Müller
On 01/17/2014 07:35 PM, William Dunlap wrote: I think that ignoring a terminal slash/backslash on Windows would do no >harm: Windows makes a distinction between "C:" and "C:/": the former is not a file (or directory) and the latter is. But, according to the documentation, neither would be curren

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Kirill Müller
On 01/17/2014 02:56 PM, Gabor Grothendieck wrote: At the moment I am using this to avoid the problem: File.exists <- function(x) { if (.Platform$OS == "windows" && grepl("[/\\]$", x)) { file.exists(dirname(x)) } else file.exists(x) } but it would be nice if that could be done by

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Kirill Müller
On 01/03/2014 01:06 PM, Duncan Murdoch wrote: On 14-01-03 5:47 AM, Kirill Müller wrote: I'm sorry, I didn't mean to be rude. Do you prefer including the entire original message when replying? Or perhaps I misunderstood you when you wrote: You don't need to include irrelevant m

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Kirill Müller
te often. I had to look at the source to see where the newlines were going, and saw it there. Could you please clarify? Thanks. -Kirill On 01/03/2014 11:39 AM, Duncan Murdoch wrote: It's dishonest to quote me out of context. Duncan Murdoch On 14-01-03 3:40 AM, Kirill Müller wrote: On

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Kirill Müller
On 01/03/2014 02:34 AM, Duncan Murdoch wrote: Carriage returns usually don't matter in LaTeX I'd rather say they do. One is like a space, two or more end a paragraph and start a new one. If newlines are stripped away, the meaning of the TeX code can change, in some cases dramatically (e.g. if c

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Kirill Müller
On 01/03/2014 01:59 AM, Duncan Murdoch wrote: But results=tex is not the default. Having defaults for one option depend on the setting for another is confusing, so I think the current setting is appropriate. True. On the other hand, I cannot imagine that "results=tex" is useful at all without

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Kirill Müller
On 01/03/2014 01:45 AM, Duncan Murdoch wrote: You are running with the strip.white option set to TRUE. That strips blank lines at then beginning and end of each output piece. Just set strip.white=FALSE. Thanks, the code below works perfectly. I have also found the documentation in ?RweaveLate

[Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Kirill Müller
Hi In the example .Rnw file below, only the newline between c and d is visible in the resulting .tex file after running R CMD Sweave. What is the reason for this behavior? Newlines are important in LaTeX and should be preserved. In particular, this behavior leads to incorrect LaTeX code gene

Re: [Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-13 Thread Kirill Müller
On 12/13/2013 06:09 PM, Brian Diggs wrote: One downside I can see with this third approach is that by making the package documentation generation part of the build process, you must then make the package depend/require roxygen (or whatever tools you are using to generate documentation). This de

Re: [Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-13 Thread Kirill Müller
are some talks about providing the above as a cloud service, so that anyone can run and/or use it. Cheers, Simon On Dec 13, 2013, at 8:51 AM, Kirill Müller wrote: On 12/13/2013 12:50 PM, Romain Francois wrote: Pushing back to github is not so difficult. See e.g http://blog.r-enthusiasts.com/

Re: [Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-13 Thread Kirill Müller
On 12/13/2013 12:50 PM, Romain Francois wrote: > Pushing back to github is not so difficult. See e.g > http://blog.r-enthusiasts.com/2013/12/04/automated-blogging.html Thanks for the writeup, I'll try this. Perhaps it's better to push the results of `R CMD build`, though. > You can manage branche

Re: [Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-13 Thread Kirill Müller
files. The only downside is that you need to install a CI, so you need a "server" for that. Maybe you can do this with travis-ci, maybe not, I am not familiar with it that much. Best, Gabor On Wed, Dec 11, 2013 at 7:39 PM, Kirill Müller wrote: Hi Quite a few R packages are now available

[Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-11 Thread Kirill Müller
Hi Quite a few R packages are now available on GitHub long before they appear on CRAN, installation is simple thanks to devtools::install_github(). However, it seems to be common practice to keep the .Rd files (and NAMESPACE and the Collate section in the DESCRIPTION) in the Git tree, and to

[Rd] Trouble running Rtools31 on Wine

2013-11-15 Thread Kirill Müller
Hi An attempt to use R and Rtools in Wine fails, see the bug report to Wine: http://bugs.winehq.org/show_bug.cgi?id=34865 The people there say that Rtools uses an outdated Cygwin DLL with a custom patch. Is there any chance we can upgrade our Cygwin DLL to a supported upstream version? Thanks.