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

2024-08-29 Thread Gábor Csárdi
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 temporary location to run things. > > If it applied .R

Re: [Rd] R-patched on CRAN is R-4.3.3

2024-08-09 Thread Gábor Csárdi
at > base-prerelease, rather than Martin's versions i Zurich and decided that his > names were better than mine. "R-latest" makes better sense for the actual > releases over in src/base. > > -pd > > > On 9 Aug 2024, at 10:33 , Ivan Krylov via R-devel > > w

Re: [Rd] R-patched on CRAN is R-4.3.3

2024-08-09 Thread Gábor Csárdi
Possibly related to this, it seems that https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz is not available any more. This file was very convenient, because it pointed to R-RC, R-beta, R-alpha or R-patched, as appropriate. Our nightly "next version of R" builds [1] depend on it. Do yo

Re: [Rd] R 4.4.0 has version of Matrix 1.7-0, but it's not available on CRAN

2024-04-26 Thread Gábor Csárdi
On Fri, Apr 26, 2024 at 1:06 PM Ivan Krylov wrote: > > On Fri, 26 Apr 2024 12:32:59 +0200 > Martin Maechler wrote: > > > Finally, I'd think it definitely would be nice for > > install.packages("Matrix") to automatically get the correct > > Matrix version from CRAN ... so we (R-core) would be grat

[Rd] R 4.4.0 has version of Matrix 1.7-0, but it's not available on CRAN

2024-04-26 Thread Gábor Csárdi
I don't know if this is a bug, but it is certainly weird. AFAICT R 4.4.0 has Matrix 1.7-0. However, currently CRAN has Package: Matrix Version: 1.6-5 Priority: recommended Depends: R (>= 3.5.0), methods ... (plus another version for R >= 4.5.0 only). Which has some weird consequences, e.g. if I

[Rd] https://cran.r-project.org/src/base-prerelease/ is not updating

2023-06-14 Thread Gábor Csárdi
https://cran.r-project.org/src/base-prerelease/ has not updated for about a week now, I guess this is not intentional? Best, Gabor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Edge case in rm() now failing in R-devel

2023-03-23 Thread Gábor Csárdi
This is new in R-devel: > rm(list = NULL) Error in rm(list = NULL) : invalid first argument It still works in r84020, but does not in r84023, possibly because of r84022 [1]. Gabor [1] https://github.com/wch/r-source/commit/4dc057f5d49d3c0590488100e418e39b68682c95 _

[Rd] La_library() always returns "" on R-devel?

2023-03-17 Thread Gábor Csárdi
Seems like this in 83986 [1] needs a fix in Lapack.c: if (dladdr((void *) F77_NAME(ilaver), &dl_info)) { char buf[PATH_MAX+1]; char *res = realpath(dl_info.dli_fname, buf); if (res) { SEXP nfo = R_NilValue; if (strstr(res,

Re: [Rd] R-devel does not compile on OpenSUSE 15.4

2023-02-10 Thread Gábor Csárdi
@FCFLAGS_f90@ $< -o $@ +ALL_CFLAGS = $(ALL_CFLAGS_LO) +ALL_FFLAGS = $(ALL_FFLAGS_LO) +ALL_FCFLAGS = $(ALL_FFLAGS_LO) + SOURCES_C = Lapack.c @USE_VECLIB_G95FIX_TRUE@ vecLibg95c.c SOURCES_F = @USE_VECLIB_G95FIX_TRUE@ vecLibg95f.f On Wed, Feb 8, 2023 at 2:03 PM Gábor Csárdi wrote: > > More

[Rd] R-devel does not compile on OpenSUSE 15.4

2023-02-08 Thread Gábor Csárdi
More precisely the built-in Lapack module. AFAICT this is because the f90 files are not compiled with -fpic. My output: make[4]: Entering directory '/tmp/R-devel/src/modules/lapack' gfortran -fpic -g -O2 -msse2 -mfpmath=sse -c dlamch.f -o dlamch.o gfortran -fpic -g -O2 -c dlapack.f -o dlapack

[Rd] Compiling R-devel on older Linux distributions, e.g. RHEL / CentOS 7

2023-02-07 Thread Gábor Csárdi
As preparation for the next release, I am trying to compile R devel on RHEL / CentOS 7, which is still supported by RedHat until 2024 June. There are two issues. One is that the libcurl version in CentOS 7 is quite old, 7.29.0, and R devel now requires 7.32.0, since 83715 about a week ago. This re

[Rd] Installation failure in non-UTF-8 MBCS locale

2022-10-17 Thread Gábor Csárdi
I am sorry, part of the output is garbled, as the email's encoding is different, but the error is hopefully still clear. This is Ubuntu 20.04, yesterday's R devel or R release, in the zh_CN locale. The zh_CN.UTF-8 locale is fine, and it is a much better option, so I am not sure if this is conside

Re: [Rd] deparse() and UTF-8 strings

2022-02-22 Thread Gábor Csárdi
strings. The parser modification itself would > also have the benefit of speeding up parsing of strings without Unicode > escapes. > > Best, > > B. > > > On 2/21/22 5:33 AM, Gábor Csárdi wrote: > > I am wondering if it would make sense to produce \u escaped st

[Rd] deparse() and UTF-8 strings

2022-02-21 Thread Gábor Csárdi
I am wondering if it would make sense to produce \u escaped strings in deparse() for UTF-8 input. Currently we have (in R-devel): x <- "G\u00e1bor" Sys.setlocale("LC_ALL", "C") #> [1] "C/C/C/C/C/en_US.UTF-8" deparse(x) #> [1] "\"Gbor\"" charToRaw(deparse(x)) #> [1] 22 47 3c 55 2b 30 30 45 31 3e

Re: [Rd] How can a package be aware of whether it's on CRAN

2021-11-23 Thread Gábor Csárdi
On Tue, Nov 23, 2021 at 8:49 PM Henrik Bengtsson wrote: > > > Is there any reliable way to let packages to know if they are on CRAN, so > > they can set omp cores to 2 by default? > > Instead of testing for "on CRAN" or not, you can test for 'R CMD > check' running or not. 'R CMD check' sets envi

[Rd] R-patched tarball at https://stat.ethz.ch/R/daily/ outdated

2021-11-17 Thread Gábor Csárdi
Hi all, AFAICT https://stat.ethz.ch/R/daily/R-patched.tar.gz is still R 4.0.5 patched. Probably needs a branch bump. FYI, Gabor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] LOGNAME env var in the check code

2021-11-16 Thread Gábor Csárdi
While trying to reproduce a NOTE for * checking for new files in some other directories ... NOTE I noticed that the check code uses Sys.getenv("LOGNAME") to query the name of the current user. However on many systems this is not set, so this is the empty string, and then no NOTE is shown. (Only

Re: [Rd] Add keywords to descriptions of R packages

2021-08-21 Thread Gábor Csárdi
FWIW R-hub indexes package metadata, and you can search it online: https://r-pkg.org/search.html?q=time+series or from within R: https://r-hub.github.io/pkgsearch/ Gabor On Sun, Aug 22, 2021 at 12:13 AM beliavsky--- via R-devel wrote: > > It's great that there are almost 20,000 R packages and th

[Rd] Non-mutable ALTREP objects

2021-06-08 Thread Gábor Csárdi
Dear all, I have another ALTREP question. In the https://github.com/ALTREP-examples/Rpkg-simplemmap example, it is possible to mmap a file read-write with wrtOK = TRUE. This is a pretty cool use case, one can change the mapped vector (in C), and the change is synchronized with the file, and also

Re: [Rd] [External] Possible ALTREP bug

2021-05-28 Thread Gábor Csárdi
> luke > > On Fri, 28 May 2021, Gábor Csárdi wrote: > > > I have found some weird SEXP corruption behavior with ALTREP, which > > could be a bug. (Or I could be doing something wrong.) > > > > I have an integer ALTREP vector that calls back to R from the Elt &g

[Rd] Possible ALTREP bug

2021-05-28 Thread Gábor Csárdi
I have found some weird SEXP corruption behavior with ALTREP, which could be a bug. (Or I could be doing something wrong.) I have an integer ALTREP vector that calls back to R from the Elt method. When this vector is indexed in a lapply(), its first element gets corrupted. Sometimes it's just a ty

[Rd] R does not start on Fedora 34

2021-04-29 Thread Gábor Csárdi
Dear all, Fedora 34 was released two days ago, and with a fresh build of R I get [root@2dba8b3587c1 R-devel]# bin/R ERROR: R_HOME ('/tmp/R-devel') not found on it, coming from https://github.com/wch/r-source/blob/0f0092adf14b8bd17bcce1cac0ee26b928355dab/src/scripts/R.sh.in#L263 Apparently `test

Re: [Rd] encodeString converts to UTF-8 on Windows R-devel

2021-04-09 Thread Gábor Csárdi
For the record, this was a bug introduced here: https://github.com/wch/r-source/commit/1c149eddee9c6d4b87a987a964a611bf8fe43a74 and fixed today here: https://github.com/wch/r-source/commit/ec0761e63598d38eb5e8ab3fb995da06ab5c91ee G. On Fri, Mar 5, 2021 at 2:52 PM Gábor Csárdi wrote: > >

[Rd] encodeString converts to UTF-8 on Windows R-devel

2021-03-05 Thread Gábor Csárdi
Which is not necessarily bad news. :) I wonder if this was intended, because I did not find anything about it in the news file. It also breaks a couple of R packages, e.g. desc, probably more. Is this intended? Thanks! This is R-devel from yesterday: > x <- "\xfc" > Encoding(x) <- "latin1" > c

Re: [Rd] Demo for linking native routines between R packages

2021-01-09 Thread Gábor Csárdi
On Sat, Jan 9, 2021 at 4:45 PM Joshua Ulrich wrote: [...] > > That said, WRE does list two packages that register native routines > from other packages: > > https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Linking-to-native-routines-in-other-packages > > There are a bunch more, see he

[Rd] R-devel crash

2020-12-18 Thread Gábor Csárdi
FYI. > sessionInfo() R Under development (unstable) (2020-12-17 r79645) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux bullseye/sid Matrix products: default BLAS: /opt/R-devel/lib/R/lib/libRblas.so LAPACK: /opt/R-devel/lib/R/lib/libRlapack.so locale: [1] LC_CTYPE=en_US

[Rd] UTF-8 characters in Rd files

2020-12-15 Thread Gábor Csárdi
Dear list, I am trying to see if there is a way to expand the set of UTF-8 characters that we can use in Rd files. The main blocker is LaTeX when building the PDF manual. It is possible to use the inputenx LaTeX package, instead of inputenc, which is an improvement, by setting the RD2PDF_INPUTENC

Re: [Rd] translation domain is wrong in stopifnot()?

2020-12-02 Thread Gábor Csárdi
Bug report: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17998 Gabor On Wed, Dec 2, 2020 at 12:09 PM Martin Maechler wrote: > > >>>>> Gábor Csárdi > >>>>> on Tue, 1 Dec 2020 23:48:37 + writes: > > > I don't know

[Rd] translation domain is wrong in stopifnot()?

2020-12-01 Thread Gábor Csárdi
I don't know if this would be considered a bug in either stopifnot() or (n)gettext(), or not a bug at all, but sometimes the translation domain is not set properly for stopifnot() messages, so they won't be translated. E.g. Sys.setenv(LANGUAGE = "de") # This is good stopifnot(FALSE) #> Fehler: FA

Re: [Rd] usage of #import in grDevices/src/qdCocoa.h

2020-10-18 Thread Gábor Csárdi
On Mon, Oct 19, 2020 at 5:02 AM Michael Chirico wrote: > > I happened to notice that this header file uses > > #import > > This is the first time I came across the preprocessor directive #import; > the first thing I found about it is this Q&A suggesting it's not portable > nor standard C: The Co

Re: [Rd] Internet access and R CMD make check-devel

2020-10-05 Thread Gábor Csárdi
One way would be to comment out these tests, or really turn off the internet, and then these tests don't run. Indeed, a successful DNS query does not mean that you can connect to the internet in general. FWIW pingr::is_online [1] implements a method that works well. Apple's Captive Portal test pag

Re: [Rd] New URL redirect checks

2020-09-17 Thread Gábor Csárdi
issue though: > the built in help browser (at least in MacOS) doesn't show the full URL > when you hover over the link, as most browsers do. So one could have > > \href{https://disney.org}{https://horrible.web.site} > > Duncan Murdoch > > > > > > Cheers

[Rd] New URL redirect checks

2020-09-16 Thread Gábor Csárdi
Dear all, the new CRAN URL checks flag HTTP 301 redirects. While I understand the intent, I think this is unfortunate, because several URL shortener services use 301 redirects, and often a shorter URL is actually better in a manual page than a longer one that can be several lines long in the conso

[Rd] CRAN metadata broken?

2020-09-11 Thread Gábor Csárdi
E.g. in https://cran.r-project.org/bin/macosx/contrib/4.0/PACKAGES there is Package: stringi Version: 1.5.3 but there is no such binary at https://cran.r-project.org/bin/macosx/contrib/4.0/ FYI, G. __ R-devel@r-project.org mailing list https://stat.et

Re: [Rd] Speed-up/Cache loadNamespace()

2020-07-20 Thread Gábor Csárdi
On Mon, Jul 20, 2020 at 9:15 AM Abby Spurdle wrote: > > It's possible to run R (or a c parent process) as a background process > via a named pipe, and then write script files to the named pipe. > However, the details depend on what shell you use. I would use screen or tmux for this, if this is an

[Rd] Possible ABI change in R 4.0.1

2020-06-29 Thread Gábor Csárdi
Hi all, it seems that from R 4.0.1 EXTPTR_PTR can be either a macro or a function, depending on whether USE_RINTERNALS is requested. Jeroen helped me find that this was in 78592: https://github.com/wch/r-source/commit/c634fec5214e73747b44d7c0e6f047fefe44667d This is a problem, because binary pac

Re: [Rd] roxygen2 / documentation of reexports

2020-06-27 Thread Gábor Csárdi
You can fix this with the dev version of roxygen, you can get it from https://github.com/r-lib/roxygen2 roxygen 7.1.1 with the fix will be on CRAN shortly, hopefully: https://github.com/r-lib/roxygen2/issues/1126 See more about this issue here: https://www.mail-archive.com/r-package-devel@r-proje

Re: [Rd] r-project.org SSL certificate issues

2020-06-10 Thread Gábor Csárdi
, this not an issue in the libraries nor R, the > certificates on the server were simply wrong. So, no, this has nothing to > do with R. > >>> > >>> Cheers, > >>> Simon > >>> > >>> > >>>> On Jun 10, 2020, at 10:45 A

Re: [Rd] [External] Re: use of the tcltk package crashes R 4.0.1 for Windows

2020-06-07 Thread Gábor Csárdi
FWIW, you can "test" this by using the daily R builds. They are here: https://ci.appveyor.com/project/jeroen/base/history This is the build before the change, it does not crash: https://ci.appveyor.com/project/jeroen/base/builds/32781690 This is the build right after the change, it does crash: ht

Re: [Rd] r-project.org SSL certificate issues

2020-05-31 Thread Gábor Csárdi
Btw. it would be also possible to create a macOS R installer that embeds a static or dynamic libcurl with Secure Transport, instead of the Apple default LibreSSL. This might be too late for R 4.0.1, I don't know. Gabor On Sun, May 31, 2020 at 4:09 PM Gábor Csárdi wrote: > > On

Re: [Rd] r-project.org SSL certificate issues

2020-05-31 Thread Gábor Csárdi
On Sat, May 30, 2020 at 11:32 PM Gábor Csárdi wrote: [...] > Btw. why does this affect openssl? That root cert was published in > 2010, surely openssl should know about it? Maybe libcurl / openssl > only uses the chain provided by the server? Without trying to use an > alternate

Re: [Rd] r-project.org SSL certificate issues

2020-05-30 Thread Gábor Csárdi
': > >>>> Error validating server certificate for 'https://svn.r-project.org:443': > >>>> - The certificate has expired. > >>>> Certificate information: > >>>> - Hostname: *.r-project.org > >>>> - Valid: from

Re: [Rd] r-project.org SSL certificate issues

2020-05-30 Thread Gábor Csárdi
On Sat, May 30, 2020 at 11:02 PM Jeroen Ooms wrote: [...] > > What you need to do is replace the final certificate with this one > (just copy-paste the base64 cert): https://crt.sh/?d=1720081 .Then > restart the server. You can also export this from Keychain Access on macOS, btw. find "COMODO RSA

Re: [Rd] r-project.org SSL certificate issues

2020-05-30 Thread Gábor Csárdi
Greater Manchester, GB > - Fingerprint: 93:B8:AF:9F:0A:67:2F:3A:C9:BA:FF:86:BB:2C:08:47:02:7F:1D:8D > (R)eject, accept (t)emporarily or accept (p)ermanently? t > Usrc/library/grid/R/grob.R > > > ssltest shows two certificates of which only one is expired? > >

[Rd] r-project.org SSL certificate issues

2020-05-30 Thread Gábor Csárdi
On macOS 10.15.5 and R-devel: > download.file("https://www.r-project.org";, tempfile()) trying URL 'https://www.r-project.org' Error in download.file("https://www.r-project.org";, tempfile()) : cannot open URL 'https://www.r-project.org' In addition: Warning message: In download.file("https://ww

Re: [Rd] docs about _R_CHECK_FORCE_SUGGESTS_ ?

2020-05-13 Thread Gábor Csárdi
See at https://cran.r-project.org/doc/manuals/r-devel/R-ints.html#Tools Gabor On Wed, May 13, 2020 at 7:05 PM Toby Hocking wrote: > > Can someone please add documentation for that environment variable to > Writing R Extensions? An appropriate place would be section > https://cloud.r-project.org/

Re: [Rd] defining r audio connections

2020-05-06 Thread Gábor Csárdi
AFAIK that API is not allowed on CRAN. It triggers a NOTE or a WARNING, and your package will not be published. Gabor On Wed, May 6, 2020 at 9:04 PM Martin Morgan wrote: > > The public connection API is defined in > > https://github.com/wch/r-source/blob/trunk/src/include/R_ext/Connections.h > >

Re: [Rd] Use of MathJax (or something similar) in .Rd files

2020-04-30 Thread Gábor Csárdi
You can probably already do this using the \if{html} conditional, and either including the matchjax js files in the package, or getting them from a CDN. Gabor On Thu, Apr 30, 2020 at 9:13 AM Viechtbauer, Wolfgang (SP) wrote: > > Hello All, > > I am wondering if there has ever been any discussion

Re: [Rd] [External] parse data wrong for R 4.0. raw strings

2020-04-22 Thread Gábor Csárdi
er. > > More likely to get fixed sooner if someone can provide a patch. > > Best, > > luke > > On Wed, 22 Apr 2020, Gábor Csárdi wrote: > > > This seems like a bug to me: > > > > code <- 'x <- r"(hello, "world")"'

[Rd] parse data wrong for R 4.0. raw strings

2020-04-22 Thread Gábor Csárdi
This seems like a bug to me: code <- 'x <- r"(hello, "world")"' getParseData(parse(text = code)) #> line1 col1 line2 col2 id parent token terminal text #> 7 11 1 24 7 0exprFALSE #> 1 11 11 1 3 SYMBOL TRUE

Re: [Rd] detect ->

2020-04-13 Thread Gábor Csárdi
On Mon, Apr 13, 2020 at 9:23 AM Gabriel Becker wrote: [...] > This means the only feasible way to detect it, which a few projects do I > believe, is process the code while it is still raw text, before it goes into > the parser, and have clever enough regular expressions. Well, especially consid

Re: [Rd] detect ->

2020-04-13 Thread Gábor Csárdi
That parser already flips -> to <- before creating the parse tree. Gabor On Mon, Apr 13, 2020 at 8:39 AM Adrian Dușa wrote: > > I searched and tried for hours, to no avail although it looks simple. > > (function(x) substitute(x))(A <- B) > #A <- B > > (function(x) substitute(x))(A -> B) > # B <-

Re: [Rd] missing binaries in R-devel windows snapshot 78175

2020-04-10 Thread Gábor Csárdi
On Fri, Apr 10, 2020 at 8:49 AM Martin Maechler wrote: [...] > > > openssl::md5(file("R-devel-win.exe")) > > or use base R'stools::md5sum() > > md5sum() has existed forever, but needs you to do the > download.file() step which is indirectly happening in > openssl::md5() also. Don't use

Re: [Rd] The finalizer of the externalPtr does not work when closing R?

2020-04-03 Thread Gábor Csárdi
See R_RegisterCFinalizerEx() and set onexit to nonzero. Here: https://github.com/wch/r-source/blob/9353ddfa8d30069ad8975e0364307d710f2488d5/src/include/Rinternals.h#L1279-L1280 Gabor On Fri, Apr 3, 2020 at 1:56 PM Wang Jiefei wrote: > > Hi all, > > I found that the finalizer of the externalPtr i

Re: [Rd] unlink() on "~" removes the home directory

2020-03-23 Thread Gábor Csárdi
s of user home directory. In principle, such file can still be > deleted from R using a combination of tilde and wildcards with wildcard > expansion enabled. > > Best > Tomas > > On 2/26/20 11:47 PM, Gábor Csárdi wrote: > > !!! DON'T TRY THE CODE IN THIS EMAIL AT HOME !

Re: [Rd] pipe(): input to, and output from, a single process

2020-03-16 Thread Gábor Csárdi
Well, if you want blocking, you can poll with an infinite timeout. This returns if 1) there is output, 2) the process terminates, or 3) you interrupt with CTRL+C / ESC /etc. and then right after the polling, you can read the output. This still works if the process has finished already. Gabor On

Re: [Rd] pipe(): input to, and output from, a single process

2020-03-16 Thread Gábor Csárdi
I am not sure if `pipe()` works for this, but if it turns out that it does not, then you can use the processx package, e.g.: > p <- processx::process$new("sed", c("-l", "s/a/x/g"), stdin = "|", stdout = > "|") > p$write_input("foobar\n") > p$read_output() [1] "foobxr\n" The `-l` sed flag is to m

[Rd] unlink() on "~" removes the home directory

2020-02-26 Thread Gábor Csárdi
!!! DON'T TRY THE CODE IN THIS EMAIL AT HOME !!! Well, unlink() does what it is supposed to do, so you could argue that there is nothing wrong with it. Also, nobody would call unlink() on "~", right? The situation is not so simple, however. E.g. if you happen to have a directory called "~", and y

Re: [Rd] R package builder silently continues after unclosed brace

2020-01-25 Thread Gábor Csárdi
R CMD build does not actually run any R code, it just puts the files together into a .tar.gz archive. R CMD INSTALL will run the R code, and fail. Gabor On Sat, Jan 25, 2020 at 4:59 PM Andy Manka wrote: > > > If you start a function in one file but don't close it, the package > will still build

[Rd] Memory error in the libcurl connection code

2020-01-22 Thread Gábor Csárdi
Hi All, I think there is a memory error in the libcurl connection code that typically happens when libcurl reads big chunks of data. This potentially affects all code that use url() with the libcurl download method, which is the default in most builds. In practice it tends to happen more with HTTP

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2020-01-11 Thread Gábor Csárdi
On Sat, Jan 11, 2020 at 12:53 PM Simon Urbanek wrote: [...] > > I think it works now, because Apple switched to a different SSL > > library for libcurl. It usually crashes or fails on older macOS > > versions, with the CRAN build of R as well. > > > > That is not true - Apple has not changed the S

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2020-01-11 Thread Gábor Csárdi
On Sat, Jan 11, 2020 at 4:14 AM Simon Urbanek wrote: [...] > > In general, any code that calls the macOS system libraries might > > crash. (Except for CoreFoundation, which seems to be fine, but AFAIR > > there is no guarantee for that, either.) > > > > That is not true, either. macOS itself is fo

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2020-01-10 Thread Gábor Csárdi
On Fri, Jan 10, 2020 at 7:23 PM Simon Urbanek wrote: > > Henrik, > > the example from the post works just fine in CRAN R for me - the post was > about homebrew build so it's conceivably a bug in their libraries. That's > exactly why I was proposing a more general solution where you can simply >

Re: [Rd] SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()

2020-01-10 Thread Gábor Csárdi
On Fri, Jan 10, 2020 at 7:23 PM Simon Urbanek wrote: > > Henrik, > > the example from the post works just fine in CRAN R for me - the post was > about homebrew build so it's conceivably a bug in their libraries. I think it works now, because Apple switched to a different SSL library for libcurl.

Re: [Rd] best way to build from Git

2019-12-26 Thread Gábor Csárdi
On Thu, Dec 26, 2019 at 12:39 PM Martin Maechler wrote: [...] > As Frederik notes / ask as well about it: > R-core people typically never build "inside the source tree" > (not "polluting" the source tree by built stuff) > but rather in separate build directory, as I'm pretty sure we've > recommend

Re: [Rd] best way to build from Git

2019-12-26 Thread Gábor Csárdi
Hi Frederick, I know some non R-core people use this workflow to keep local patches in git branches: https://bookdown.org/lionel/contributing/ Best, Gabor On Thu, Dec 26, 2019 at 1:37 AM wrote: > > Dear R-devel, > > I checked out a recent copy of R via Subversion and made a few changes to the

Re: [Rd] Downsized R configuration for flat deployment

2019-12-21 Thread Gábor Csárdi
Hi, FWIW this recent project of mine has somewhat similar goals: https://github.com/r-hub/r-minimal Gabor On Sat, Dec 21, 2019 at 2:40 PM wrote: > > Dear folks, > > I'm testing a downsized R build - in features and obviously sizes - > for a "modern" flat deployment (eg. like python virtualenv,

Re: [Rd] source definition for R_NilValue/return from TYPEOF(R_NilValue)

2019-12-16 Thread Gábor Csárdi
It is in the source: https://github.com/wch/r-source/blob/ea8c13aef93058c71d647619583b561567856584/src/include/Rinternals.h#L110 https://github.com/wch/r-source/blob/ea8c13aef93058c71d647619583b561567856584/src/include/Rinternals.h#L1798 It could probably be in https://cran.r-project.org/doc/manua

Re: [Rd] [External] R C api for 'inherits' S3 and S4 objects

2019-11-01 Thread Gábor Csárdi
AFAIR getAttrib() can allocate as well. Also, R API functions that do not allocate today, may allocate in the future. Gabor On Fri, Nov 1, 2019 at 1:24 PM Jan Gorecki wrote: > > Thank you Luke. > That is why I don't use Rf_inherits but INHERITS which does not > allocate, provided in the email bo

[Rd] Built field in binary packages missing the platform

2019-10-24 Thread Gábor Csárdi
It seems that for binary packages that do not contain compiled code, the "Built` field looks like this: Built: R 3.6.0; ; 2019-09-23 13:56:59 UTC; unix I.e., the second part, the platform string is missing. For a package that has compiled code, it is present: Built: R 3.6.0; x86_64-apple-darwin1

[Rd] \Sexpr{} within \examples{}

2019-10-08 Thread Gábor Csárdi
Hi all, I am trying to use \Sexpr{} within \examples{} in the manual, and it all works fine, except that I get an error and then a NOTE from R CMD check when it checks for long lines in the manual. The long line check calls `Rd2txt` with fragment = TRUE, because it only checks the \usage{} and \e

Re: [Rd] Evaluate part of an expression at C level

2019-09-27 Thread Gábor Csárdi
Yes, you can manipulate the language object, and replace the the 1:10 with its own 5. element, and then call eval on the modified expression. This can be simple if you know the structure of the expression well, and difficult otherwise. It goes like this: SEXP lang_test(SEXP expr, SEXP idx, SEXP i

Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread Gábor Csárdi
his seems like a nice idiom; I've seen others use > if(!interactive()){ > main() > } > to a similar effect. > > Best, > CG > > On Sunday, August 25, 2019, 01:16:06 AM CDT, Gábor Csárdi > wrote: > > > This is what I

Re: [Rd] Conventions: Use of globals and main functions

2019-08-24 Thread Gábor Csárdi
This is what I usually put in scripts: if (is.null(sys.calls())) { main() } This is mostly equivalent to the Python idiom. It the script runs from Rscript, then it will run main(). It also lets you source() the script, and debug its functions, test them, etc. It works best if all the code in th

Re: [Rd] Making R CMD nicer

2019-06-30 Thread Gábor Csárdi
For the record, this is Linux R-devel: root@4bef68c16864:~# R CMD /opt/R-devel/lib/R/bin/Rcmd: 60: shift: can't shift that many root@4bef68c16864:~# R CMD -h /opt/R-devel/lib/R/bin/Rcmd: 62: exec: -h: not found root@4bef68c16864:~# R CMD --help /opt/R-devel/lib/R/bin/Rcmd: 62: exec: --help: not fo

Re: [Rd] R-Forge > GitHub?

2019-06-28 Thread Gábor Csárdi
On Fri, Jun 28, 2019 at 6:01 AM Spencer Graves wrote: [...] > 1. Clone a copy of "https://github.com/sbgraves237/Ecdat"; > to my local computer and confirm that it works. > I suggest you put each package in its own repository, because our R tooling (e.g. Travis CI, etc.) works best

Re: [Rd] use of buffers in sprintf and snprintf

2019-05-31 Thread Gábor Csárdi
On Fri, May 31, 2019 at 3:39 AM Henrik Bengtsson wrote: [...] > On MS Windows, there's actually a limit of 255 characters, cf. > http://www.aroma-project.org/howtos/UseLongFilenamesOnWindows/ > (disclaimer: I'm the author). Note particularly the comment at the > end: > > "Unfortunately it is not

Re: [Rd] read.table() fails with https in R 3.6 but not in R 3.5

2019-05-13 Thread Gábor Csárdi
Hi Tomas, On Mon, May 13, 2019 at 11:42 AM Tomas Kalibera wrote: [...] > This is because (from NEWS:) > > The default ‘user agent’ has been changed when accessing http:// >and https:// sites using libcurl. (A site was found which caused >libcurl to infinite-loop with the previous

Re: [Rd] [External] Re: Background R session on Unix and SIGINT

2019-05-01 Thread Gábor Csárdi
On Wed, May 1, 2019 at 4:20 PM Simon Urbanek wrote: > I think you're talking about two independent things. You can interrupt the > computation, no question about that. It's just that if you send an interrupt > while you're *not* doing any computations, it will be signaled but not raised > until

Re: [Rd] [External] Re: Background R session on Unix and SIGINT

2019-04-30 Thread Gábor Csárdi
to wait for input and > periodically wake and check for interrupts. In that case the interrupt > will probably be seen sooner. > > If the interactive behavior is what you want you can add --interactive > to the arguments used to start R. > > Best, > > luke > > On

Re: [Rd] Background R session on Unix and SIGINT

2019-04-30 Thread Gábor Csárdi
t; Most of the WIN32 processing is event-based. > > Cheers, > Simon > > > > On Apr 30, 2019, at 4:17 PM, Gábor Csárdi wrote: > > > > Yeah, I get that they are async. > > > > What happens is that the background process is not doing anything when > >

Re: [Rd] Background R session on Unix and SIGINT

2019-04-30 Thread Gábor Csárdi
; > > On Apr 30, 2019, at 3:44 PM, Gábor Csárdi wrote: > > > > Hi All, > > > > I realize that this is not a really nice reprex, but anyone has an > > idea why a background R session would "remember" an interrupt (SIGINT) > > on Unix? > > >

[Rd] Background R session on Unix and SIGINT

2019-04-30 Thread Gábor Csárdi
Hi All, I realize that this is not a really nice reprex, but anyone has an idea why a background R session would "remember" an interrupt (SIGINT) on Unix? rs <- callr::r_session$new() rs$interrupt() # just sends a SIGINT #> [1] TRUE rs$run(function() 1+1) #> Error: interrupt rs$run(function

Re: [Rd] topenv of emptyenv

2019-03-28 Thread Gábor Csárdi
On Thu, Mar 28, 2019 at 11:43 AM Martin Maechler wrote: [...] > > Indeed... and as I mentioned I had never actively noticed the > use of topenv() at all... FWIW topenv() is used in a couple of packages, although some of these are false positives: https://github.com/search?q=org%3Acran+topenv&type

Re: [Rd] Possibly broken system2 env-option

2019-03-19 Thread Gábor Csárdi
ystem2 constructs a command like > > FOO=bar cmd args > > and passes that to sh via system(). On windoes, system() does not call sh, so > system2() does (effectively) > > cmd FOO=bar args > > and hopes that cmd knows what to do with the env setting. > > -pd >

Re: [Rd] Possibly broken system2 env-option

2019-03-19 Thread Gábor Csárdi
On Tue, Mar 19, 2019 at 9:59 AM peter dalgaard wrote: [...] > What you need is something like (NB: single quotes!) > > system2("sh", env = c("VAR='Hello World'"), args = c("-c 'echo $VAR'")) > Hello World Just out of curiosity, do you think it is possible to make this portable, assuming sh is ava

Re: [Rd] Possibly broken system2 env-option

2019-03-19 Thread Gábor Csárdi
Probably not broken, just hard to get the quoting right? Or it does not work with echo? It is surely hard to get it right, I have been trying for 15 minutes.I am pretty sure that the correct form is env = "VAR='Hello-World'" but spaces and other special characters might cause trouble. E.g. this wo

Re: [Rd] package installation needs the file utility on Unix

2019-03-08 Thread Gábor Csárdi
sl, so, dylib or > dll in the package installation is not in fact a shared object, one will > get a number of error messages from the respective tools, but the > installation passes. Currently on Linux this is the case of RcppParallel > and FastRWeb. > > Tomas > > On 3/7/19 11:57 P

[Rd] package installation needs the file utility on Unix

2019-03-07 Thread Gábor Csárdi
The new staged package installation shells out to the 'file' utility on Unix systems: https://github.com/wch/r-source/blob/31ee14c620eb1b939acd322f3b5617f998aab8e8/src/library/tools/R/install.R#L578 Although 'file' is usually present on most Unix systems, it might be missing from small Docker cont

[Rd] R CMD build installing the package to process help pages

2019-03-04 Thread Gábor Csárdi
Dear All, If a package has dynamic manual pages (i.e. `\Sexpr{} macros), then R CMD build installs the package, and (by default) creates the PDF manual. I understand that this is needed for build-time Sexprs. Could anyone explain me why `R CMD build` needs to install the package if all the Sexpr

Re: [Rd] Compile R to WebAssembly / Emscripten?

2019-02-20 Thread Gábor Csárdi
This was some time ago: https://stat.ethz.ch/pipermail/r-devel/2013-May/066724.html So probably not hopeless, but I would think it is a lot of work. Gabor On Wed, Feb 20, 2019 at 8:17 AM Todd Wilder wrote: > > Has anyone attempted to compile R (probably without any OS bindings) to > WebAssembly

Re: [Rd] Encoding issues

2019-02-18 Thread Gábor Csárdi
On Mon, Feb 18, 2019 at 4:42 PM Iñaki Ucar wrote: > > On Mon, 18 Feb 2019 at 17:27, Gábor Csárdi wrote: > > > > From "Writing R Extensions": > > > > "Only ASCII characters (and the control characters tab, formfeed, LF > > and CR) should be use

Re: [Rd] Encoding issues

2019-02-18 Thread Gábor Csárdi
>From "Writing R Extensions": "Only ASCII characters (and the control characters tab, formfeed, LF and CR) should be used in code files." So I am afraid you cannot use μm. Gabor On Mon, Feb 18, 2019 at 3:36 PM Iñaki Ucar wrote: > > Hi, > > We found a (to our eyes) strange behaviour that might

Re: [Rd] R_MAKEVARS_SITE for multiple archs

2019-01-30 Thread Gábor Csárdi
> HOME/.R/Makevars.win64 on Windows), or if that does not exist, > HOME/.R/Makevars, This should do. Gabor On Wed, Jan 30, 2019 at 1:34 PM Gábor Csárdi wrote: > > Dear all, > > is there a way to set R_MAKEVARS_SITE (or something else), so that R > finds Makevars.site for multi

[Rd] R_MAKEVARS_SITE for multiple archs

2019-01-30 Thread Gábor Csárdi
Dear all, is there a way to set R_MAKEVARS_SITE (or something else), so that R finds Makevars.site for multiple archs? AFAICT the only option is to put the arch directories in R.home(). But I might be missing something. My goal is to set different make variables for 32-bit and 64-bit R on Window

Re: [Rd] Hex sticker

2019-01-22 Thread Gábor Csárdi
FWIW man/figures/logo.png is picked up by pkgdown web sites, and also by roxygen if you have a man page for the package itself. Gabor On Tue, Jan 22, 2019 at 1:34 PM Therneau, Terry M., Ph.D. via R-devel wrote: > > Is there a canonical place to add a hex sticker to a package?I've found > us

[Rd] patch to support custom HTTP headers in download.file() and url()

2018-12-04 Thread Gábor Csárdi
The patch below adds support for custom HTTP headers in download.file() and url(). My main motivation for this is performing basic http authentication. Some web sites do not support embedding the credentials into the URI itself, they only work if the username and password are sent in the HTTP head

Re: [Rd] sys.call() inside replacement functions incorrectly returns *tmp*

2018-10-15 Thread Gábor Csárdi
Seems like there are at least two packages for multiple assignment, maybe one of them solves your needs, zeallot and dub. https://r-pkg.org/search.html?q=multiple+assignment Gabor On Tue, Oct 16, 2018 at 12:03 AM Abs Spurdle wrote: > > Kia Ora > > > Although I'm not sure what problem it would so

[Rd] Possible bug, max argument in print.default(), on R-3.5.1-patched

2018-09-22 Thread Gábor Csárdi
The max argument of print.default() does not override options(max.print), see below. R 3.5.1 and R-devel both seem good. Gábor > options(max.print = 1) > print(data.frame(a=1:10)) a 1 1 [ reached 'max' / getOption("max.print") -- omitted 9 rows ] > print(data.frame(a=1:10), max = 100) a

Re: [Rd] future time stamps warning

2018-09-20 Thread Gábor Csárdi
On Thu, Sep 20, 2018 at 11:46 AM Leo Lahti wrote: > > Time stamps are correct and my system time is correct. > > I am now tried to use Sys.setFileTime() to update time stamps as proposed. > This does not help. > > The windows and debian builds give different reports on the time stamp > issue. > ht

  1   2   3   4   >