[Rd] on.exit() handler being interrupted by time limit

2025-04-27 Thread Duncan Murdoch
roblem in R. BTW, the help for setTimeLimit() says that the time limit check happens frequently during `Sys.sleep()`, but that doesn't appear to be true. I've tried a variation on the code above which sleeps for 20 seconds, even with a ti

Re: [Rd] should the top of doc/NEWS.3 mention doc/NEWS.Rd ?

2025-04-13 Thread Duncan Murdoch
tions when you installed R, you may or may not actually have static copies of them installed. The help server in R may generate them on the fly. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Check for protection

2025-04-11 Thread Duncan Murdoch
e PROTECT calls, but it's not really that different. Duncan Murdoch On 2025-04-11 11:57 a.m., Paul McQuesten wrote: For a long-term horizon, would it help R developers to use a naming convention? Perhaps, varName_PROT, or the inverse varName_UNPROT? Eventually, teach some linter about th

[Rd] Check for protection (was: table() and as.character() performance for logical values)

2025-04-11 Thread Duncan Murdoch
ly, but it would be really helpful in debugging. Duncan Murdoch On 2025-04-11 6:05 a.m., Suharto Anggono Suharto Anggono via R-devel wrote: On second thought, I wonder if the caching in my changed 'StringFromLogical' in my previous message is safe. While 'ans' in the C

Re: [Rd] WRE Date field & CRAN

2025-04-06 Thread Duncan Murdoch
a non-standard format would be. I just did a check, and got this NOTE: The Date field is not in ISO 8601 -mm-dd format. So I think the docs are correct. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Suppressed "graphical parameter" warnings reviving themselves magically

2025-04-05 Thread Duncan Murdoch
help.start()' for an HTML browser interface to help. Type 'q()' to quit R. plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) }) NULL NULL Warning message: "foo" is not a graphical parameter plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) }) NULL NULL In R.

Re: [Rd] request for discussion on lonely doc patch suggestion

2025-04-05 Thread Duncan Murdoch
urrently I don't use svn for anything but the R sources, but I suspect that will continue for some time... Duncan Murdoch On 2025-03-24 4:05 p.m., Tim Taylor wrote: FWIW, on the command line I’m a happy 'delta' user for a quick side by side comparison (https://github.com

Re: [Rd] R CMD check and CRAN's Rust policy

2025-04-04 Thread Duncan Murdoch
eep within the action script. A simpler approach would be to fork my fork and set the default value for "demote" to whatever you want, then install your own fork during the Github action. Comments are welcome. Duncan Murdoch On 2025-03-31 1:48 p.m., Ben Bolker wrote: On 2025-03-

Re: [Rd] Problems with ::

2025-04-04 Thread Duncan Murdoch
is not a real function. It has special meaning in formulas and should only be used there. Use Strata() outside of a formula.") Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-31 Thread Duncan Murdoch
call entry points which might terminate The message being matched has to appear all on one line, but multiple patterns can be given on separate lines. Embedded newlines are not allowed. A simple fixed grep is used to match it to the check log. See the ?rcmdcheck help page for more details. Dunc

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-31 Thread Duncan Murdoch
On 2025-03-31 4:50 p.m., Duncan Murdoch wrote: Just for fun I forked rcmdcheck and added arguments to it to allow particular messages to be changed in severity. For example, if the WARNING message says something which matches the regexp "Compiled code should not call entry points which

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-31 Thread Duncan Murdoch
ted on CRAN and locally by suppressing stdout/err. But that would be adversarial and I would like to adhere to the intent of the check. I think Tim was suggesting that you modify your Github action to ignore this particular warning. The warning would still appear, but it wouldn't cause a

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-31 Thread Duncan Murdoch
which should be set to "error", and "upload-result", which should be set to "true". So this is the easy part. Then examine those results, ignore the warnings you don't care about, and trigger on warnings you do care about. I have never written a github acti

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-31 Thread Duncan Murdoch
imilar to _R_CHECK_CRAN_INCOMING_ to skip this check primarily for GitHub Actions and CI? The "Compiled code should not call entry points which might terminate R" isn't a new warning. I think the last change to it was made in 2022. Maybe your code, or code in one of the libraries you use, has

Re: [Rd] Patch for RJSONIO

2025-03-25 Thread Duncan Murdoch
I think email to the maintainer is likely the only choice. The maintainer is "CRAN Team ". Duncan Murdoch On 2025-03-25 6:58 p.m., Ben Bolker wrote: Maybe https://github.com/duncantl/RJSONIO ? (That page also points to https://omegahat.org/RJSONIO, which is now defunct ...) On

Re: [Rd] request for discussion on lonely doc patch suggestion

2025-03-25 Thread Duncan Murdoch
it is cross-platform. Based just on that comparison page, I'd probably choose DiffMerge or Diffuse, but I imagine some of the others can match them. Duncan Murdoch On 2025-03-25 6:53 a.m., Serguei Sokol via R-devel wrote: Le 24/03/2025 à 20:28, J C Nash a écrit : For Linux users, mel

Re: [Rd] Why does NextMethod() pick up duplicate arguments in '...' if given positionally at top level?

2025-03-25 Thread Duncan Murdoch
maybe submit a patch for that, too. Duncan Murdoch On 2025-03-25 2:12 a.m., Michael Chirico wrote: Consider: foo <- function(x, y, ...) { UseMethod("foo") } foo.default <- function(x, y = 0, ...) { cat(sprintf("%s: x=%s, y=%s\n", as.character(ma

Re: [Rd] request for discussion on lonely doc patch suggestion

2025-03-24 Thread Duncan Murdoch
27;ve been using it for a very long time (20 years or more, I think), and I suspect there are very good open source competitors out there now (and may have been for all the time I've been using BC). Suggestions? Duncan Murdoch __ R-devel@r-proje

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-02 Thread Duncan Murdoch
ed for R to add another environment variable. BTW, as far as I can see current R-devel doesn't issue an error, it just issues warnings about two issues: - the package is downloading crates - the rustc compiler doesn't report a version number Duncan Murdoch I'm not

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-02 Thread Duncan Murdoch
the repository where you want to put your package to put that option or environment variable in place, and there's no longer a problem. Duncan Murdoch Ideally, the check can remain, but scoped appropriately. On Sun, Mar 2, 2025 at 6:49 AM Duncan Murdoch <mailto:murdoch.dun...@gmail

Re: [Rd] R CMD check and CRAN's Rust policy

2025-03-02 Thread Duncan Murdoch
versions there may be different. Those are some of the issues that Simon was alluding to. Duncan Murdoch On 2025-03-02 5:45 a.m., Mossa Merhi Reimert via R-devel wrote: Dear Simon Urbanek, There has been very little engagement with the issue I referred to. If it was decided that this “check

Re: [Rd] 87668 fails on Windows 10 with "pdflatex not found"

2025-01-29 Thread Duncan Murdoch
Sorry, that misses a step. You should try R CMD Sweave --pdf displaylist.Rnw which runs it through Sweave to make displaylist.tex and then tries to run texi2pdf() on that. Duncan Murdoch On 2025-01-29 3:00 p.m., Duncan Murdoch wrote: The builder runs tools::texi2pdf() on the vignettes

Re: [Rd] 87668 fails on Windows 10 with "pdflatex not found"

2025-01-29 Thread Duncan Murdoch
The builder runs tools::texi2pdf() on the vignettes. Does that give the same error for you? Do earlier revisions work? Duncan Murdoch On 2025-01-29 2:20 p.m., Avraham Adler wrote: I see there have been a number of tweaks to the document build recently (87650, 87654, 87658, 97660, 97661, etc

Re: [Rd] Fix documentation about <- and = differences

2025-01-04 Thread Duncan Murdoch
roject.org (rev 608, same day). Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Fix documentation about <- and = differences

2025-01-04 Thread Duncan Murdoch
error. My own feeling is that any use of "=" as an assignment operator is too much. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Possible issue in stats/arima.R package

2025-01-02 Thread Duncan Murdoch
On 2025-01-02 11:20 a.m., Duncan Murdoch wrote: On 2025-01-02 9:04 a.m., Norbert Kuder wrote: Hello all, I am running R version 4.4.2 (2024-10-31 ucrt) on Windows 10 x64, and noticed something that might be a minor bug (or at least inconsistent code) in the stats/arima.R package. I have found

Re: [Rd] Possible issue in stats/arima.R package

2025-01-02 Thread Duncan Murdoch
], Delta, kappa, SSinit) if(ncxreg > 0) x <- x - xreg %*% coef[narma + (1L:ncxreg)] arimaSS(x, mod) yet the log shows no recent changes. I'm not sure what's going on. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] 'else' on new line not parsed at top level as part of preceding 'if'

2024-12-02 Thread Duncan Murdoch
BTW, this is discussed in section 3.2.1 of "The R Language Definition". Duncan Murdoch On 2024-12-02 10:56 a.m., Mikael Jagan wrote: I wonder if there is room for improvement here: > str2lang("if (a) b1else b0") if (a) b1 else b0 > str2

Re: [Rd] 'else' on new line not parsed at top level as part of preceding 'if'

2024-12-02 Thread Duncan Murdoch
when they are complete, it will evaluate this and return b1 or NULL. Putting the full expression in braces solves the issue, because this is clearly incomplete: { if (a) b1 Duncan Murdoch On 2024-12-02 10:56 a.m., Mikael Jagan wrote: I wonder if there is room for improvement here:

Re: [Rd] Could .Primitive("[") stop forcing R_Visible = TRUE?

2024-10-25 Thread Duncan Murdoch
ax to have side effects. Surely you or they should be the ones to run the test across all of CRAN? Duncan Murdoch On 2024-10-25 6:35 a.m., Ivan Krylov via R-devel wrote: On Thu, 24 Oct 2024 13:23:56 -0400 Toby Hocking wrote: The patch you are proposing to base R is https://github.com/Rdata

Re: [Rd] Apply .Rbuildignore before copying files in R CMD build

2024-08-29 Thread Duncan Murdoch
On 2024-08-29 3:34 p.m., Gábor Csárdi wrote: On Thu, Aug 29, 2024 at 12:12 AM Duncan Murdoch wrote: [...] I think the reason is simplicity. The build process can add, delete or modify files. You wouldn't want that to happen on the original source files, so R copies the files to a temp

Re: [Rd] Apply .Rbuildignore before copying files in R CMD build

2024-08-28 Thread Duncan Murdoch
. Having an R package that needs so much data that you can't fit two copies of it on your disk is a really unusual situation. I think it will have to be up to you to fix it (by increasing your temp space, or decreasing the size of some of those files, or something else).

Re: [Rd] specials and ::

2024-08-27 Thread Duncan Murdoch
) ~ datavector + strata(inst), data=lung) if a user had a vector named datavector. Duncan Murdoch Terry On 8/27/24 03:38, peter dalgaard wrote: In my view, that's just plain wrong, because strata() is not a function but a special operator in a model formula. Wouldn't i

Re: [Rd] specials and ::

2024-08-26 Thread Duncan Murdoch
On 2024-08-26 12:34 p.m., Duncan Murdoch wrote: On 2024-08-26 10:42 a.m., Therneau, Terry M., Ph.D. via R-devel wrote: The survival package makes significant use of the "specials" argument of terms(), before calling model.frame; it is part of nearly every modeling function. The reaso

Re: [Rd] specials and ::

2024-08-26 Thread Duncan Murdoch
less likely to show up in another package, but it's old code. This isn't on CRAN yet, so I'd be interested in hearing about problems with this approach, or better solutions. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] specials and ::

2024-08-26 Thread Duncan Murdoch
rary() or require()") in functions that could trigger the problems. Duncan Murdoch Would there be a tolerably easy way to make the fit fail loudly on `survival::strata(…)` rather than return the wrong result? On Aug 26, 2024, at 7:42 AM, Therneau, Terry M., Ph.D. via R-devel wrot

Re: [Rd] Question about regexp edge case

2024-08-09 Thread Duncan Murdoch
Thanks! I think your suggested additions to the docs are perfect. Duncan Murdoch On 2024-08-09 5:01 a.m., Tomas Kalibera wrote: On 8/1/24 20:55, Duncan Murdoch wrote: Thanks Tomas.  Do note that my original post also mentioned a bug or doc error in the PCRE docs for this regexp:   - perl

Re: [Rd] Question about regexp edge case

2024-08-01 Thread Duncan Murdoch
hould only match the literal string "{,5}"). Duncan On 2024-08-01 6:49 a.m., Tomas Kalibera wrote: On 7/29/24 09:37, Ivan Krylov via R-devel wrote: В Sun, 28 Jul 2024 20:02:21 -0400 Duncan Murdoch пишет: gsub("^([0-9]{,5}).*","\\1","123456789

[Rd] Question about regexp edge case

2024-07-28 Thread Duncan Murdoch
"123456789", because "{,5}" is documented to not be a quantifier, so it should only match the literal string "{,5}"). - Some regexp engines (including Perl and Awk) document that "12345" is correct. Is any of this worth fixing? Duncan Murdoch

Re: [Rd] \>

2024-06-29 Thread Duncan Murdoch
x27;t single step through a pipe (as far as I know), but with that modification, you can see what you've got at any point. Duncan Murdoch On 2024-06-29 6:57 p.m., Spencer Graves wrote: Hi, Duncan: On 6/29/24 17:24, Duncan Murdoch wrote:   Yes. I'm not yet facile with "|

[Rd] \>

2024-06-29 Thread Duncan Murdoch
rds: x |> f(a = 1) |> g(b = 2) is just g(f(x, a = 1), b = 2) This isn't quite true of the magrittr pipe, but it is exactly true of the base pipe. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] rbind() on zero row matrices is inconsistent

2024-06-26 Thread Duncan Murdoch
nd to it, but the 0xn matrix is unchanged for n > 0. Clearly from the help this is intentional, but is it desirable? Wouldn't it make more sense for NULL to be ignored by rbind() and cbind()? Duncan Murdoch __ R-devel@r-project.org mai

Re: [Rd] SET_TYPEOF no longer allowed, how should I call R from within C?

2024-06-25 Thread Duncan Murdoch
better, the one that comes with the development version of R. Duncan Murdoch As a more comprehensive example of constructing an R call in C code and evaluating, consider the following fragment of printAttributes in src/main/print.c. /* Need to construct a call to print(CAR(a

Re: [Rd] Segfault when parsing UTF-8 text with srcrefs

2024-05-28 Thread Duncan Murdoch
0x102d22fa0 run_REngineRmainloop + 260 14 R 0x102d1a64c -[REngine runREPL] + 124 15 R 0x102d0dd90 main + 588 16 dyld 0x188fae0e0 start + 2360 Duncan Murdoch __

Re: [Rd] Keep class attribute when applying c() to hexmodes

2024-05-27 Thread Duncan Murdoch
n you should submit a patch containing it to bugs.r-project.org. Based on c.Date, here's a first attempt: c.hexmode <- function(...) as.hexmode(c(unlist(lapply(list(...), function(e) unclass(as.hexmode(e)) If you want this to be incorporated into R, y

[Rd] config.site settings for M3 Mac typo in manual?

2024-05-20 Thread Duncan Murdoch
I've just upgraded to an M3 Mac laptop, and I'm working through getting the right configure settings to build R. The Installation and Administration manual says to have this in config.site: FFLAGS="-g -O2 -mmacos-version-min=11.0" FCFLAGS="-g -O2 -mmacos-version-min=11.0" but those give an err

Re: [Rd] FR: Customize background colour of row and column headers for the View output

2024-05-15 Thread Duncan Murdoch
A criticism of your suggestion is that it is not backwards compatible. Does that matter? I don't know, but probably not. The X11 version of the viewer does what you suggest. Duncan Murdoch On 2024-05-15 2:20 a.m., Iago Giné Vázquez wrote: About the decisions: Actually, the sam

Re: [Rd] FR: Customize background colour of row and column headers for the View output

2024-05-14 Thread Duncan Murdoch
cess to Windows), but I could help with the design. Duncan Murdoch On 2024-05-14 5:25 a.m., Iago Giné Vázquez wrote: Thanks again Duncan and Ivan, I forward then the email to R-devel. Summarizing, the dataedit options (in RGui preferences or RConsole) to colouring the View output do not hav

Re: [Rd] read.csv

2024-04-16 Thread Duncan Murdoch
put as Jing Hua: Input filename.csv: Gene,SNP,prot,log10p YWHAE,13:62129097_C_T,1433E,7.35 YWHAE,4:72617557_T_TA,1433E,7.73 Output: > read.csv("filename.csv") Gene SNP prot log10p 1 YWHAE 13:62129097_C_T 1433 7.35 2 YWHAE 4:72617557_T_TA 1433 7.73 Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Repeated library() of one package with different include.only= entries

2024-04-11 Thread Duncan Murdoch
onal <- Matrix::isDiagonal instead of messing around with the user's search list, which may have been intentionally set to include only one of those. So I'd suggest changing the docs to say "[library and require] check and update the list of currently attached packages and do not reload a namespace which is already loaded. If a package is already attached, no change will be made." Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Bug in out-of-bounds assignment of list object to expression() vector

2024-04-05 Thread Duncan Murdoch
Yes, definitely looks like a bug. Are you able to submit it to bugs.r-project.org? Duncan Murdoch On 05/04/2024 8:15 a.m., June Choe wrote: There seems to be a bug in out-of-bounds assignment of list objects to an expression() vector. Tested on release and devel. (Many thanks to folks over at

Re: [Rd] RSS Feed of NEWS needs a hand

2024-04-02 Thread Duncan Murdoch
On 02/04/2024 8:50 a.m., Dirk Eddelbuettel wrote: On 2 April 2024 at 07:37, Dirk Eddelbuettel wrote: | | On 2 April 2024 at 08:21, Duncan Murdoch wrote: | | I have just added R-4-4-branch to the feeds. I think I've also fixed | | the \I issue, so today's news includes a long l

Re: [Rd] RSS Feed of NEWS needs a hand

2024-04-02 Thread Duncan Murdoch
I have just added R-4-4-branch to the feeds. I think I've also fixed the \I issue, so today's news includes a long list of old changes. Duncan Murdoch On 16/03/2024 8:47 a.m., Duncan Murdoch wrote: I have now put the files online at https://github.com/dmurdoch/diffnews . It seeme

Re: [Rd] declare and validate options

2024-03-29 Thread Duncan Murdoch
e development of the pipe operator: it was in magrittr (and I think another package, but I forget the name) first, was widely adopted, then a simpler version was brought into base R. Duncan Murdoch Le ven. 29 mars 2024 à 16:25, Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> a écr

Re: [Rd] declare and validate options

2024-03-29 Thread Duncan Murdoch
ithout needing to duplicate the rules. If those functions could be made simple enough and bulletproof and were widely adopted, maybe they'd be copied into one of the base packages, but really the only need for that would be to support validation on setting, rather than validation on

Re: [Rd] RSS Feed of NEWS needs a hand

2024-03-16 Thread Duncan Murdoch
I have now put the files online at https://github.com/dmurdoch/diffnews . It seemed like too much trouble to include the SVN history, so this is just a copy of the current version of the files. Duncan Murdoch On 15/03/2024 12:04 p.m., Lluís Revilla wrote: Hi! Thanks for this service! It is

Re: [Rd] RSS Feed of NEWS needs a hand

2024-03-15 Thread Duncan Murdoch
I wrote it about 16 years ago). Duncan Murdoch On 15/03/2024 12:04 p.m., Lluís Revilla wrote: Hi! Thanks for this service! It is very helpful to know what is being developed. I distribute the content to other venues and I noticed some times that the updates are duplicated. For example, the sentence

Re: [Rd] Vignettes with long compute time

2024-03-11 Thread Duncan Murdoch
, but you could always write the code something like this: if (Sys.getenv("RUN_SLOW_CHUNKS", 0)) { ... the slow code goes here ... } else cat("This chunk takes several hours to compute. If you want to run it, set the environment variable RUN_SLOW_CHUNKS to

Re: [Rd] R6 "classname" and generator name

2024-03-11 Thread Duncan Murdoch
R/RandomSearch.R#L11-L12 I don't have any idea if this is intentional or not. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [External] Re: capture "->"

2024-03-04 Thread Duncan Murdoch
7 9 SYMBOL TRUE x2 9 1 12 1 13 9 10exprFALSE The expressions produced are the same, but the parse data is different. Duncan Murdoch On 04/03/2024 11:51 a.m., Bill Dunlap wrote: Maybe someone has already suggested this, but if your functions accepted st

Re: [Rd] capture "->"

2024-03-02 Thread Duncan Murdoch
the operands reversed when it sees that token. Duncan Murdoch On 02/03/2024 6:06 a.m., Adrian Dușa wrote: That would have been an elegant solution, but it doesn't seem to work: `->` <- `+` 1 -> 3 # expecting 4 Error in 3 <- 1 : invalid (do_set) left-hand side to assignment I

Re: [Rd] capture "->"

2024-03-01 Thread Duncan Murdoch
On 01/03/2024 8:51 a.m., Dmitri Popavenko wrote: On Fri, Mar 1, 2024 at 1:00 PM Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: ... I was thinking more of you doing something like   parse(text = "A -> B", keep.source = TRUE) I forget what t

Re: [Rd] capture "->"

2024-03-01 Thread Duncan Murdoch
On 01/03/2024 5:25 a.m., Dmitri Popavenko wrote: Dear Duncan, On Fri, Mar 1, 2024 at 11:30 AM Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: ... If you parse it with srcrefs, you could look at the source.  The parser doesn't record whether it was A

Re: [Rd] capture "->"

2024-03-01 Thread Duncan Murdoch
wonder if there is any possibility whatsoever to signal the use of -> instead of <- If you parse it with srcrefs, you could look at the source. The parser doesn't record whether it was A -> B or B <- A anywhere else. Duncan Murdoch __

Re: [Rd] Bug in comparison of language objects?

2024-02-20 Thread Duncan Murdoch
On 20/02/2024 8:03 a.m., Duncan Murdoch wrote: I noticed the following odd behaviour today: exprs <- expression( mean(a), mean(b), { a }, { b } ) exprs[[1]] == exprs[[2]] #> [1] FALSE exprs[[3]] == exprs[[4]] #> [1] TRUE Does it make sense to anyone that the

[Rd] Bug in comparison of language objects?

2024-02-20 Thread Duncan Murdoch
tained in braces doesn't? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Suggestion: simplify trace() interface

2024-02-19 Thread Duncan Murdoch
here" to be the *only* way to limit tracing to some copies of the function, and if "where" is omitted, trace() should attempt to modify all copies? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] round.Date and trunc.Date not working / implemented

2024-02-09 Thread Duncan Murdoch
On 08/02/2024 7:58 p.m., Jiří Moravec wrote: > This is a workaround, and could be the basis for a round.Date improvement: >   date <- Sys.Date() >   as.Date(round(as.POSIXct(date), "years")) >   as.Date(round(as.POSIXct(Sys.Date() + 180), "years"))

Re: [Rd] round.Date and trunc.Date not working / implemented

2024-02-08 Thread Duncan Murdoch
This is a workaround, and could be the basis for a round.Date improvement: date <- Sys.Date() as.Date(round(as.POSIXct(date), "years")) as.Date(round(as.POSIXct(Sys.Date() + 180), "years")) Duncan Murdoch On 08/02/2024 12:23 p.m., Henrik Bengtsson wrote: Techni

Re: [Rd] [EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-07 Thread Duncan Murdoch
} And here's what I get when I run it on rgl: dupnames("rgl") name first dup 1 fns knitr.R:12 knitr.R:165 2 fns knitr.R:12 pkgdown.R:14 3 fns knitr.R:12shiny.R:8 Those are okay; the fns object is a temporary that is later removed in each case. Duncan Murd

Re: [Rd] [External] Get list of active calling handlers?

2024-02-07 Thread Duncan Murdoch
On 07/02/2024 8:36 a.m., luke-tier...@uiowa.edu wrote: On Tue, 6 Feb 2024, Duncan Murdoch wrote: The SO post https://stackoverflow.com/q/77943180 tried to call globalCallingHandlers() from a function, and it failed with the error message "should not be called with handlers on the stack

Re: [Rd] [EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-07 Thread Duncan Murdoch
)) { cat("Duplicated names in ", basename(f), ":\n") cat(paste(allnames[dups], collapse = ", "), "\n") } } It could be made more fancy to report the locations of both the original and the dup if you feel motivated. Duncan Murdoch On 06/02/2024 8:0

[Rd] Get list of active calling handlers?

2024-02-06 Thread Duncan Murdoch
including non-global ones (like the one try() added in the line above)? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-06 Thread Duncan Murdoch
the check code isn't smart enough to follow every code path, so it gives the note to warn you that you might have something wrong. You still have the same issue with my workaround, but the check code isn't smart enough to notice that. Duncan Murdoch H. On 2/4/24 09:07, Duncan Mur

Re: [Rd] Advice debugging M1Mac check errors

2024-02-04 Thread Duncan Murdoch
Hi John. I don't think the 80 bit format was part of IEEE 754; I think it was an Intel invention for the 8087 chip (which I believe preceded that standard), and didn't make it into the standard. The standard does talk about 64 bit and 128 bit floating point formats, but not 80 bit

Re: [Rd] NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-04 Thread Duncan Murdoch
is that you have a function object in your function which can't be called unconditionally. The workaround doesn't create such an object. Recognizing that your function never tries to call fun requires global inspection of toto(), and most of the checks are based on local inspection.

Re: [Rd] [Feature Request] Hide API Key in download.file() / R's libcurl

2024-02-01 Thread Duncan Murdoch
I've just been reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication, and it states that putting userid:password in the URL is deprecated, but it does make sense that R should protect users who still use that scheme. Duncan Murdoch On 01/02/2024 11:28 a.m., Xinyi

Re: [Rd] [External] readChar() could read the whole file by default?

2024-01-29 Thread Duncan Murdoch
#x27;t know, but I think usually people would want the behaviour of paste(readLines(f), collapse = "\n"). Duncan Murdoch On Fri, Jan 26, 2024 at 2:05 PM luke-tierney--- via R-devel wrote: On Fri, 26 Jan 2024, Michael Chirico wrote: I am curious why readLines() has a default (n=-1L)

Re: [Rd] eval(parse()) within mutate() returning same value for all rows

2023-12-29 Thread Duncan Murdoch
g the last element." That text has been unchanged in the help page for 13 years. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] zapsmall(x) for scalar x

2023-12-17 Thread Duncan Murdoch
I'm really confused. Steve's example wasn't a scalar x, it was a vector. Your zapsmall() proposal wouldn't zap it to zero, and I don't see why summary() would if it was using your proposal. Duncan Murdoch On 17/12/2023 8:43 a.m., Gregory R. Warnes wrote: Isn’t

Re: [Rd] Request: documenting more specifically language objects in the R Language Definition document

2023-12-13 Thread Duncan Murdoch
l. But that's a big benefit for you if you are really interested in working with this kind of thing. Duncan Murdoch On 13/12/2023 4:19 a.m., Iago Giné Vázquez wrote: Dear all, This is a request to get language objects more documented in the R Language Definition document (CRAN version&l

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

2023-10-31 Thread Duncan Murdoch
*() functions to use only long names doesn't make sense. On the other hand, not modifying the executable name would make a lot of sense, wouldn't it? I'm pretty sure all supported versions of Windows can handle long filenames. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Wayland Display Support in R Plot

2023-10-29 Thread Duncan Murdoch
o get it to work with the ancient OpenGL 1.2 that rgl uses. I forget whether it was just hard or actually impossible. I am slowly working towards having rgl use newer OpenGL versions, but I don't expect this to be done for quite a while. Duncan Murdoch Cheers, Simon Several Linux d

Re: [Rd] FR: valid_regex() to test string validity as a regular expression

2023-10-09 Thread Duncan Murdoch
currently valid code: grepl(1, "abc123") It's not great style, but shouldn't generate an error. Duncan Murdoch At root, the problem is that R does not expose the regex compilation routines like 'tre_regcomp', so from the R side we have to resort to hacky approaches.

Re: [Rd] as(, "dgTMatrix")' is deprecated.

2023-10-03 Thread Duncan Murdoch
code that catches the warning, but it will also include the context where it was triggered. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-03 Thread Duncan Murdoch
vice" = 1) } This does the dev.set even if there's only one device so it can return the resulting device number. Duncan Murdoch Trevor On Mon, Oct 2, 2023 at 5:25 PM Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: Thanks!  However, isn't length(dev.l

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Duncan Murdoch
Thanks! However, isn't length(dev.list()) == 0 when there are no devices? That's what I'm seeing on MacOS. Duncan Murdoch On 02/10/2023 4:21 p.m., Trevor Davis wrote: > Use it just like dev.off(), but it *will* restore the previous device. I'm observing that if t

[Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Duncan Murdoch
like dev.off(), but it *will* restore the previous device. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
I think this is a `ragg` device bug, so I've posted an issue there: https://github.com/r-lib/ragg/issues/143 . That issue contains slightly more detail than I included in the earlier message here. Duncan Murdoch __ R-devel@r-project.org ma

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
st which is likeliest? - I have some misconception about how this is supposed to work - The Kanji font on my system misreports some measurements - The ragg::agg_png() device misreports measurements - Some other bug somewhere. Duncan On 26/09/2023 5:57 a.m., Duncan Murdoch wrote: Thanks

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
Thanks! I said "base graphics" in my question, but I really have no objection to using grid graphics, so I'll explore those grid functions. Duncan Murdoch On 25/09/2023 3:53 p.m., Paul Murrell wrote: Hi strheight(), which is based GEStrHeight(), is pretty crude, not only igno

[Rd] Tight bounding box around text in graphics?

2023-09-25 Thread Duncan Murdoch
ight" value that includes lots of space below the character, and a "top_border" value that measures from the top of the textbox to the baseline. So I think `height - top_border` would give me what I'm asking for. But this only works with graph

Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Duncan Murdoch
ext() match the values used by your Cairo package, or are equivalent measurements available elsewhere? Duncan Murdoch On 24/09/2023 6:55 p.m., Simon Urbanek wrote: Duncan, drawing text is one of the most complicated things you can do, so it really depends how for you want to go. You can d

Re: [Rd] NROW and NCOL on NULL

2023-09-23 Thread Duncan Murdoch
itive and possibly less error prone. If you don't list any examples of problems, then the only possible conclusion is that there aren't any except obscure ones, so the answer is clearly that it is not worth it to make this change. Duncan Murdoch Regards, Simone On Sat, Sep 23,

[Rd] Help requested: writing text to a raster in memory

2023-09-23 Thread Duncan Murdoch
e.g. if some user interaction requires the axis labels to be recomputed and redrawn. Does anyone with experience doing this kind of thing know of examples I can follow, or have advice on how to proceed? Or want to volunteer to help with this? Duncan Murdoch __

Re: [Rd] NROW and NCOL on NULL

2023-09-23 Thread Duncan Murdoch
It's been documented for a long time that NCOL(NULL) is 1. What particular problems did you have in mind? There might be other ways to guard against them. Duncan Murdoch On 23/09/2023 1:43 p.m., Simone Giannerini wrote: Dear list, I do not know what would be the 'correct'

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-22 Thread Duncan Murdoch
. identical(NA, NA_real_) is FALSE, as it should be). If you are using a different test, that's user error. Duncan Murdoch On 22/09/2023 2:41 p.m., Hervé Pagès wrote: We could also question the value of having an infinite number of NA representations in the complex space. For example all thes

Re: [Rd] Strange behaviour of do.call()

2023-09-19 Thread Duncan Murdoch
Sorry, it's a silly thinko. I misspelled the vline argument. Thanks Ivan for the gentle nudge! Duncan Murdoch On 19/09/2023 10:44 a.m., Duncan Murdoch wrote: The knitr::kable() function does some internal setup, including determining the target format, and then calls an internal fun

[Rd] Strange behaviour of do.call()

2023-09-19 Thread Duncan Murdoch
ot;1", "1", "0", "0", "0", "4", "4", "4", "3", "3", "3", "4", "4", "1", "1", "2", "1"), caption = NULL, escape = TRUE, vlign = &

[Rd] Bug in PCRE interface code

2023-09-04 Thread Duncan Murdoch
<<8) + entry[1] - 1; where entry is declared as a pointer to a char. What this is doing is extracting a 16 bit number from the first two bytes of a character string holding the name of the capture group. Since char is a signed type, the conversion of bytes to integer gets messed up and th

  1   2   3   4   5   6   7   8   9   10   >