Re: [R-pkg-devel] Discovering M1mac cowpads

2023-03-24 Thread Simon Urbanek
John, you provide no details to go on, but generally the main difference is that arm64 uses 64-bit precision for long double (which is permitted by the C standard), while Intel uses 80-bits of precision (on systems that enable it). That leads to differences in results, e.g. when computing long

Re: [R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package

2023-03-17 Thread Simon Urbanek
Packages can only be installed from the repositories listed and only CRAN is the default so only CRAN package are guaranteed to work. I'd like to add that the issue below is exactly why, personally, I would not recommend using Bioconductor package as strong dependency (imports/depends), because

Re: [Rd] nightly r-devel.pkg builds failing since Jan 15

2023-02-26 Thread Simon Urbanek
Gabe, thanks, this was a fall-out from a power outage due to the cyclone. Although all systems were back up, svn lock files have led to an early abort in the update step. It should be fixed now. Cheers, Simon > On 27/02/2023, at 10:40 AM, Gabriel Becker wrote: > > Hi all, > > It looks

Re: [R-pkg-devel] Sanitize Input Code for a Shiny App

2023-02-26 Thread Simon Urbanek
Bill, the short answer is you can't limit anything at R level. Any attempts to create a list of "bad" commands are trivial to circumvent since you can compute on the language in R, so you can construct and call functions with trivial operations. Similarly, since R allows the loading of binary

Re: [Rd] determine if `suppressMessages()` has been invoked

2023-02-19 Thread Simon Urbanek
Nino, that is the wrong way around as Ivan pointed out. Rprintf() is not the tool for this as explained. If you want messages, use them, it's easy to wrap it to C code: static void Rmessage(const char *msg) { SEXP msg_sym = Rf_install("message"); SEXP msg_call = PROTECT(lang2(msg_sym,

Re: [Rd] Question on non-blocking socket

2023-02-17 Thread Simon Urbanek
Ben, yes, by definition - non-blocking means that reads won't block and always return immediately (the point of non-blocking). The loop below is terrible as it will cause 100% CPU usage while it's spinning. It seems that you want to block so why are you using non-blocking mode? select()

Re: [R-pkg-devel] R OpenCL on an AMD GPU

2023-02-07 Thread Simon Urbanek
Quirin, this is a contributed package question, so you should either use the GitHub issues (https://github.com/s-u/OpenCL/issues) for the package or contact the maintainer (me). But before you do so, you have to provide a lot more details including exact code you used and the full output of

Re: [R-pkg-devel] Best current way to hook into the event loop?

2023-02-02 Thread Simon Urbanek
Duncan, I don't know if it is best, but you can have a look at "background"[1] which is I believe what "later" was inspired by. It is a very minimal example so should give you ideas on how to do that in your package - it runs the R code on the main thread so it should be as close to safe as

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-30 Thread Simon Urbanek
ot;=", fixed = TRUE) : > input string 137 is invalid in this locale > > # R 4.1.0 - ... > $ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv()['BOOM']" > Error in substring(x, m + 1L) : invalid multibyte string at '' > Calls: Sys.getenv -> substring &g

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-30 Thread Simon Urbanek
Tomas, I think you're not addressing the actual issue which is a clear regression in Sys.getenv() [because it used to work and still works for single env var, but not a list] and the cryptic error due to that regression (caused by changes in R-devel). So in either case, Sys.getenv needs fixing

Re: [R-pkg-devel] If you had to choose one binary to preserve for a pkg, which would it be?

2023-01-24 Thread Simon Urbanek
Uri, I can speak only for macOS package binaries and they have been rarely re-built. The only time when a re-build is necessary is when a dependency is updated and breaks its backward-compatibility (sadly, yes, that happens). It is relatively rare, but recently Matrix was one example with

Re: [Rd] patch about timezone name of China Standard Time on windows

2023-01-08 Thread Simon Urbanek
> On 7/01/2023, at 1:17 PM, gong yu wrote: > > understand your concerns. > for registerTZ.c itself , IMHO , the most important part is the definition of > tztable[] . which come form > http://unicode.org/cldr/data/diff/supplemental/windows_tzid.html ,but it > can’t access now, the lasted

Re: [Rd] patch about timezone name of China Standard Time on windows

2023-01-06 Thread Simon Urbanek
Just a quick comment here - this is not as easy as it sounds, because the code is in the "extra" directory which means it is based on upstream sources, so those sources are typically not patched manually as it would be hard to apply upstream updates. In this case the standards have changed

Re: [Rd] Repeated segfault at installing sysdata.rda with clang/san build

2022-12-18 Thread Simon Urbanek
This crashes unceremoniously in glibc: > tools:::sysdata2LazyLoadDB("./R/sysdata.rda","../../../library/tools/R") xdrmem_create(0x7ffdf19699e0, 0x7ffdf1969ba0, 4) Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1

Re: [Rd] I do not want that R CMD build removes temp directory

2022-12-15 Thread Simon Urbanek
Yes: $ R CMD INSTALL --help | grep error --no-clean-on-error do not remove installed package on error But probably more commonly used way is to install the package from its unpacked directory as that avoids the use of temporary directories in the first place. In you case you can

Re: [R-pkg-devel] NOTE about use of `:::`

2022-12-14 Thread Simon Urbanek
David, why not call[[1]] <- parse_args The assignment is evaluated in your namespace so that makes sure the call is that of your function. The only downside I see is that in a stack trace you'll see the definition instead of the name. Or possibly do.call(parse_args, as.list(call[-1]))

Re: [R-pkg-devel] Minimum macOS version ?

2022-12-08 Thread Simon Urbanek
el wrote: > > > Simon, > > On 9 December 2022 at 10:00, Simon Urbanek wrote: > | the minimum required version for the high-sierra build is 10.13 and for > big-sur build is 11.0 (as the names imply). Although it is not unrealistic to > move Intel to macOS 10.14, it wou

Re: [R-pkg-devel] Minimum macOS version ?

2022-12-08 Thread Simon Urbanek
Dirk, the minimum required version for the high-sierra build is 10.13 and for big-sur build is 11.0 (as the names imply). Although it is not unrealistic to move Intel to macOS 10.14, it would be more problematic to move to 10.15 since it is the version that killed 32-bit support so 10.14 is

Re: [R-pkg-devel] LAPACK errors in r-devel only

2022-11-28 Thread Simon Urbanek
Louis, you didn't provide any details (please always post a link to the sources you're talking about!), but I suspect you are missing character length arguments, Lapack.h has: F77_NAME(dgeevx)(const char* balanc, const char* jobvl, const char* jobvr, const char* sense, const

Re: [Rd] RTools40 Error - sh: line 1: gcc: command not found

2022-11-28 Thread Simon Urbanek
Gene, I believe you have the wrong page - the link you listed is for an old version of R (4.0-4.1) - the current one (for 4.2.x) is https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html Cheers, Simon > On 29/11/2022, at 7:39 AM, Gene Leynes wrote: > > Hello, > > I installed

Re: [R-pkg-devel] Resubmission of archived package after email change

2022-11-24 Thread Simon Urbanek
Have you followed the instructions? > CRAN Repository Policy > > Submission > [...] > Explain any change in the maintainer’s email address and if possible send > confirmation from the previous address (by a separate email to > cran-submissi...@r-project.org) or explain why it is not possible.

Re: [R-pkg-devel] R, Rust and CRAN

2022-11-12 Thread Simon Urbanek
community to do. Cheers, Simon > On Nov 13, 2022, at 9:20 AM, Dirk Eddelbuettel wrote: > > > On 13 November 2022 at 08:15, Simon Urbanek wrote: > | sorry, I think you misunderstood: CRAN machines have the compilers, but the > packages were not detecting it properly and

Re: [R-pkg-devel] R, Rust and CRAN

2022-11-12 Thread Simon Urbanek
to make the same mistakes over again. Cheers, Simon > On Nov 13, 2022, at 7:27 AM, Jeroen Ooms wrote: > > On Sat, Nov 12, 2022 at 12:49 AM Simon Urbanek > wrote: >> >> this does not directly address your question, but I think it would make a >> lot of sense to

Re: [R-pkg-devel] R, Rust and CRAN

2022-11-11 Thread Simon Urbanek
Florian, this does not directly address your question, but I think it would make a lot of sense to standardize the process, given how many issues there were with packages using Rust (mainly not detecting compilers correctly, not supplying source code, unsolicited writing into user's

Re: [Rd] as.Date without "origin"

2022-11-03 Thread Simon Urbanek
Dan, as.Date() and as.POSIXct() have been updated to allow replacement of the hidden functions .POSIXct() and .Date() which were the only way to correctly convert the numeric representation of the objects as Johannes explained. Given that this is a very common operation (especially with

Re: [Rd] Lazy-evaluate elements wrapped with invisible

2022-10-30 Thread Simon Urbanek
Dipterix, I think delayedAssign() example you posted does what you want - if you don't assign the environment, it will be garbage-collected. If you fetch the value, it will be evaluated. However, I think what you meant is to have the result in one specific delayed symbol so: a <- function() {

Re: [Rd] tools:: extracting pkg dependencies from DCF

2022-10-15 Thread Simon Urbanek
Jan, I think using a single DCF as input is not very practical and would not be useful in the context you describe (creating self contained repos) since they typically concern a list of packages, but essentially splitting out the part of install.packages() which determines which files will

Re: [R-pkg-devel] Issue handling datetimes: possible differences between computers

2022-10-10 Thread Simon Urbanek
Liam, I think I have failed to convey my main point in the last e-mail - which was that you want to parse the date/time in the timezone that you care about so in your example that would be > foo <- as.Date(33874, origin = "1899-12-30") > foo [1] "1992-09-27" > as.POSIXlt(as.character(foo),

Re: [R-pkg-devel] Issue handling datetimes: possible differences between computers

2022-10-09 Thread Simon Urbanek
Alexandre, it's better to parse the timestamp in correct timezone: > foo = as.POSIXlt("2021-10-01", "UTC") > as.POSIXct(as.character(foo), "Europe/Berlin") [1] "2021-10-01 CEST" The issue stems from the fact that you are pretending like your timestamp is UTC (which it is not) while you want to

Re: [R-pkg-devel] R build fail without a message

2022-09-26 Thread Simon Urbanek
Paul, I wouldn't worry about oldrel - that's likely an incomplete run (I don't see that error anymore), but I would worry about the failure on R-release: https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/EdSurvey-00check.html You can always check with the Mac Builder before you

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
make sense to exclude it. It would be pointless to appease the load check just to not be able to perform the function it was designed for... Cheers, Simon > On 27/09/2022, at 11:11 AM, Simon Urbanek wrote: > > > >> On 27/09/2022, at 11:02 AM, Gabriel Becker wrote: >

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
lcome. > > ~G > > On Mon, Sep 26, 2022 at 2:40 PM Simon Urbanek > wrote: > > > > On 27/09/2022, at 10:21 AM, Iñaki Ucar wrote: > > > > On Mon, 26 Sept 2022 at 23:07, Simon Urbanek > > wrote: > >> > >> Iñaki, > >> > &

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
> On 27/09/2022, at 10:21 AM, Iñaki Ucar wrote: > > On Mon, 26 Sept 2022 at 23:07, Simon Urbanek > wrote: >> >> Iñaki, >> >> I'm not sure I understand - system dependencies are an entirely different >> topic and I would argue a far more important

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
022 at 01:55, Simon Urbanek > wrote: >> >> Iñaki, >> >> I fully agree, this a very common issue since vast majority of server >> deployments I have encountered don't allow internet access. In practice this >> means that such packages are effectively bann

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
ter/configure#L5412 > > Note it does have some sort of workaround in place for non-internet-capable > build machines, but it is external (the build in question fails without the > workaround already explicitly performed). > > Best, > ~G > > > > On Mon, Sep 26, 202

Re: [Rd] Proposal to limit Internet access during package load

2022-09-26 Thread Simon Urbanek
> On Sep 27, 2022, at 8:25 AM, Iñaki Ucar wrote: > > On Sat, 24 Sept 2022 at 01:55, Simon Urbanek > wrote: >> >> Iñaki, >> >> I fully agree, this a very common issue since vast majority of server >> deployments I have encountered don't allow i

Re: [Rd] Proposal to limit Internet access during package load

2022-09-23 Thread Simon Urbanek
Iñaki, I fully agree, this a very common issue since vast majority of server deployments I have encountered don't allow internet access. In practice this means that such packages are effectively banned. I would argue that not even (1) or (2) are really an issue, because in fact the CRAN

Re: [R-pkg-devel] windows i386

2022-09-14 Thread Simon Urbanek
Florian, since there was no direct response and given the earlier discussion I figured I chime. The main problem seems to be your build system that doesn't work. Since you didn't post the actual version of the package, I can only see the CRAN version which still don't set any of the necessary

Re: [Rd] ...()

2022-08-27 Thread Simon Urbanek
Someone with historical knowledge may shed more light on whether this was ever intended in the language, but based on the current implementation I would say that this is a (perhaps convenient) side-effect of how substitute works and not an explicitly defined behavior (since there is no special

Re: [Rd] Floating point issue

2022-07-11 Thread Simon Urbanek
I don’t think there is any guarantee that unrepresentable numbers are parsed into defined patterns, because printing is done by the OS while parsing is done by R. The way R parses decimal numbers[1] is simply by using the obvious res = res * 10 + digit and it can be easily checked that for

Re: [Rd] Rgui.exe: bug associated with non-ASCII characters

2022-05-19 Thread Simon Urbanek
I think it was just a really confusing report (it took me a while to parse it), but I suspect the issue the poster tried to raise was the fact that without selection apparently submits an incomplete line if non-ASCII chars are involved. All the steps 1-5 were correct behaviour, but 6

Re: [R-pkg-devel] How to fix Tcl/Tk Error on Mac OS build

2022-04-26 Thread Simon Urbanek
Thanks, indeed, as part of full re-install for R 4.2.0 package builds the Tcl/Tk libraries were missing. Now fixed and summarytools check with * checking data for non-ASCII characters ... NOTE Note: found 78 marked UTF-8 strings Status: 1 NOTE I'll just repeat the important link that Tomas

Re: [Rd] calloc() vs. R_Calloc()

2022-04-07 Thread Simon Urbanek
Adrian, there are many more allocations in your code - for example, you're using resize() from utils.c which uses malloc/free so it will break since it's using the wrong allocator. You may need to replace *all* allocations in your project, not just some. Cheers, Simon > On 8/04/2022, at

Re: [R-pkg-devel] Package accepted, then an error to fix by 3/22

2022-03-08 Thread Simon Urbanek
Michael, I can replicate the problem on macOS so this is not system-specific - did you actually try to re-build the vignette? As can be seen from the output the problem is is the following line: one_rec %>% pull(abstract_text) %>% print

Re: [R-pkg-devel] UTF-8 characters inside R functions for data transformation

2021-12-21 Thread Simon Urbanek
Xavier, short answer is no, because there is no guarantee that user's system supports any encoding other than ASCII, so that code wouldn't run. Hence you can't use non-ASCII characters in symbols. That said, you can use Unicode _strings_, so metadata[["\u00e1cc\u00e9nts"]] will work in

Re: [R-pkg-devel] pandoc missing on r-{release,oldrel}-macos-x86_64

2021-12-16 Thread Simon Urbanek
Sure, installed pandoc 2.16.2. Cheers, Simon > On Dec 17, 2021, at 9:21 AM, Dirk Eddelbuettel wrote: > > > CRAN results flag NOTEs on the two platforms > r-release-macos-x86_64 > r-oldrel-macos-x86_64 > because `pandoc` is apparently missing. These platforms being somewhat > common,

Re: [R-pkg-devel] R Vignette Knitting Issues in CRAN Release

2021-12-09 Thread Simon Urbanek
Eric, did you check the contents of the package file you submitted? The session info in the vignette is quite old, and the build has been packaged by you so I don't think it has anything to do with CRAN, but to make sure, check the file you submitted. Cheers, Simon > On Dec 10, 2021, at

[Rd] String interpolation [Was: string concatenation operator (revisited)]

2021-12-07 Thread Simon Urbanek
For more advanced > applications, a low level string interpolation expression constructor could > be provided (that could either parse a general string — at the user’s risk, > or build it directly from expressions). > > — Taras > > >> On 7 Dec 2021, at 12:0

Re: [Rd] string concatenation operator (revisited)

2021-12-07 Thread Simon Urbanek
> On Dec 7, 2021, at 22:09, Taras Zakharko wrote: > > Great summary, Avi. > > String concatenation cold be trivially added to R, but it probably should not > be. You will notice that modern languages tend not to use “+” to do string > concatenation (they either have > a custom operator

Re: [Rd] capturing multiple warnings in tryCatch()

2021-12-02 Thread Simon Urbanek
Adapted from demo(error.catching): > W=list() > withCallingHandlers(foo(), warning=function(w) { W <<- c(W, list(w)); > invokeRestart("muffleWarning") }) > str(W) List of 2 $ :List of 2 ..$ message: chr "warning 1" ..$ call : language foo() ..- attr(*, "class")= chr [1:3]

Re: [R-pkg-devel] mget with Inherits Not Finding Variable in Caller

2021-11-30 Thread Simon Urbanek
Dario, > On Dec 1, 2021, at 12:00 PM, Dario Strbenac > wrote: > > Good day, > > What I am misunderstanding about the inherits = TRUE option of mget? I expect > the small example to work. > > f <- function(x, .iteration = i) g() > g <- function() mget(".iteration", inherits = TRUE) >

Re: [R-pkg-devel] rstan issue [Was: CRAN submission error when running tests in testthat]

2021-11-26 Thread Simon Urbanek
r all the help! > > Nathan > > > > > Dr Nathan Green > > @: n8thangr...@yahoo.co.uk > Tel: 07821 318353 > > > > On Thursday, 25 November 2021, 22:56:45 GMT, Simon Urbanek > wrote: &

[R-pkg-devel] rstan issue [Was: CRAN submission error when running tests in testthat]

2021-11-25 Thread Simon Urbanek
s[[1L]]) > 12. │ └─base doTryCatch(return(expr), name, parentenv, handler) > 13. └─rstan fun(libname, pkgname) > 14. └─base::dyn.load(tbbmalloc_proxy, local = FALSE, now = TRUE) > > My guess is that the 'rstan' package is trying to forcefully load > libt

Re: [R-pkg-devel] CRAN submission error when running tests in testthat

2021-11-25 Thread Simon Urbanek
Nathan, testthat is notorious for obfuscation and unhelpful output as can be clearly seen in the head of testthat.Rout.fail: > library(testthat) > library(BCEA) Attaching package: 'BCEA' The following object is masked from 'package:graphics': contour > > test_check("BCEA") ***

Re: [R-pkg-devel] Inconsistent available package dependencies

2021-11-18 Thread Simon Urbanek
Michael, this is really a CRAN question rather than a package question so you may have more luck asking CRAN, but generally it is not a a good idea to have strong dependencies (Depends/Imports) on Bioconductor packages. If you want to use non-CRAN packages I would recommend weak depends like

Re: [R-pkg-devel] How to update the email address of a package maintainer

2021-11-08 Thread Simon Urbanek
>From CRAN Policy: > Explain any change in the maintainer’s email address and if possible send > confirmation from the previous address (by a separate email to > cran-submissi...@r-project.org) or explain why it is not possible > Cheers, Simon

Re: [Rd] FLIBS in MacOS M1 binary at odds with documentation for optional libraries/tools

2021-11-01 Thread Simon Urbanek
Naras, thanks. It seems that the FLIBS check resolves symlinks, unfortunately (all others are fine). I would like to remind people that reports are a lot more useful *before* the release - that's why we publish RCs. Thanks, Simon > On Nov 2, 2021, at 3:03 PM, Balasubramanian Narasimhan

Re: [Rd] parallel PSOCK connection latency is greater on Linux?

2021-11-01 Thread Simon Urbanek
delays the ACK to >> the first packet of the incoming result. >> >> So I'd say Nagle is hardly to blame for this. It would be interesting >> to see how many packets are generated with TCP_NODELAY on. If there >> are still 6 packets, then we are fine. If we suddenly see a

[R-pkg-devel] CRAN Mac Builder based on M1

2021-10-20 Thread Simon Urbanek
Dear Mac useRs. I'm pleased to announce that thanks to the R Foundation and donations from users like you we are now able to offer a CRAN Mac Builder based on M1 hardware which allows package authors that don't have access to a recent Mac to check their package using the same process as

Re: [R-pkg-devel] How does one install a libtool generated libfoo.so.1 file into ./libs/?

2021-10-20 Thread Simon Urbanek
Pariksheet, dynamic linking won't work, compile a static version with PIC enabled. If the subproject is autoconf-compatible this means using --disable-shared --with-pic. Then you only need to add libfoo.a to your PKG_LIBS. Cheers, Simon > On Oct 19, 2021, at 4:13 PM, Pariksheet Nanda >

Re: [R-pkg-devel] Concise Summary For Any Variety Of R Function

2021-10-20 Thread Simon Urbanek
Dario, there is not such thing as S4 function. However, all functions have an environment and for functions from packages that environment will be the namespace of the package. So in those special cases you can use environmentName() to get the name, e.g.: > who = function(f)

Re: [Rd] Is it a good choice to increase the NCONNECTION value?

2021-08-25 Thread Simon Urbanek
. > > This is incredible that 64 bits computers in 2021 with gigabytes of RAM still > have similar limits, and that R, has a hard-coded limit at 128. > > > -- > > Sincerely > > André GILLIBERT > > > De : qwey...@mail.ustc.edu.cn

Re: [Rd] [External] Re: Is it a good choice to increase the NCONNECTION value?

2021-08-24 Thread Simon Urbanek
justed > at runtime. Users who want to go higher would do so at their own risk > and may need to know how to adjust the soft limit on the process. > > Best, > > luke > > On Wed, 25 Aug 2021, Simon Urbanek wrote: > >> >> Martin, >> >> I don't think

Re: [Rd] Is it a good choice to increase the NCONNECTION value?

2021-08-24 Thread Simon Urbanek
Martin, I don't think static connection limit is sensible. Recall that connections can be anything, not just necessarily sockets or file descriptions so they are not linked to the system fd limit. For example, if you use a codec then you will need twice the number of connections than the

Re: [Rd] [External] Re: Update on rtools4 and ucrt support

2021-08-23 Thread Simon Urbanek
Avi, thanks. Yes, the whole point of the developer blog posts by R-core are for uses to provide feedback, so that's great - it's odd that it required a somewhat orthogonal post to start the discussion several months later, but I'm glad we got here. Note that the point of the switch is to

Re: [Rd] [External] Re: Update on rtools4 and ucrt support

2021-08-23 Thread Simon Urbanek
Avi, please see the announcement: https://developer.r-project.org/Blog/public/2021/03/12/windows/utf-8-toolchain-and-cran-package-checks/index.html the documentation is in

Re: [Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-12 Thread Simon Urbanek
Henrik, I'm not quite sure I understand the report to be honest. Just a quick comment here - using quit() in a forked child is not allowed, because the R clean-up is only intended for the master as it will be blowing away the master's state, connections, working directory, running master's

Re: [Rd] Double to uint64_t on M1

2021-08-11 Thread Simon Urbanek
Dipterix, this has nothing to do with R. 2^63 is too large to be represented as singed integer, so the behavior is undefined - to quote from the C99 specs (6.3.1.4): "If the value of the integral part cannot be represented by the integer type, the behavior is undefined." Your subject

Re: [Rd] attach "warning" is a message

2021-08-09 Thread Simon Urbanek
Barry, it is not a warning nor plain output, it is a message, so you can use > d = data.frame(x=1:10) > x=1 > suppressMessages(attach(d)) > Looking at the history, this used to be cat() but got changed to a message in R 3.2.0 (r65385, CCIng Martin in case he remembers the rationale for

Re: [Rd] On read.csv and write.csv

2021-07-01 Thread Simon Urbanek
Just for completeness, all this is well documented: CSV files: By default there is no column name for a column of row names. If ‘col.names = NA’ and ‘row.names = TRUE’ a blank column name is added, which is the convention used for CSV files to be read by spreadsheets.

Re: [Rd] On read.csv and write.csv

2021-06-30 Thread Simon Urbanek
Stephen, the "unhelpful" column are the row names. They are considered an important part of a data frame and therefore the default (row.names = TRUE) is to not lose them (as there is no way back once you do). If you don't want to preserve the row names you can simply set row.names=FALSE.

Re: [Rd] S3 weirdness

2021-06-24 Thread Simon Urbanek
Gabor, just by using zoo::read.zoo() you *do* load the namespace: > args(zoo::read.zoo) function (file, format = "", tz = "", FUN = NULL, regular = FALSE, index.column = 1, drop = TRUE, FUN2 = NULL, split = NULL, aggregate = FALSE, ..., text, read = read.table) NULL > sessionInfo()

Re: [Rd] [External] Possible ALTREP bug

2021-06-16 Thread Simon Urbanek
The usual quote applies: "use the source, Luke": $ grep _ELT *.h | sort Rdefines.h:#define SET_ELEMENT(x, i, val) SET_VECTOR_ELT(x, i, val) Rinternals.h: The function STRING_ELT is used as an argument to arrayAssign even Rinternals.h:#define VECTOR_ELT(x,i)((SEXP *) DATAPTR(x))[i]

Re: [Rd] Feature request – math in HTML help

2021-05-27 Thread Simon Urbanek
Just to clarify the confusion, let me rephrase that. I see this as a request to add support for converting \eqn{} and friends to MathJax in R html documentation (both in core packages as well as all contributed packages). That sounds like a reasonable request to me, but I would not volunteer

Re: [Rd] R Console Bug?

2021-04-17 Thread Simon Urbanek
Just for completeness, This can be easily illustrated simply in R, no C code needed: cat("foo\n\rbar\n") In unix terminal: > cat("foo\n\rbar\n") foo bar In Mac-GUI: > cat("foo\n\rbar\n") bar Cheers, Simon > On Apr 17, 2021, at 20:29, Simon Urban

Re: [Rd] R Console Bug?

2021-04-17 Thread Simon Urbanek
s not seem to be printing properly. > It seems I am doing something wrong with REprintf and R_FlushConsole. > Best regards, > Morgan > > On Sat, Apr 17, 2021 at 12:36 AM Simon Urbanek > wrote: > Sorry, unable to reproduce on macOS, in R console: > > > dyn.load("

Re: [Rd] R Console Bug?

2021-04-16 Thread Simon Urbanek
Sorry, unable to reproduce on macOS, in R console: > dyn.load("test.so") > .Call("printtest",1e4L) Processing data chunk 1 of 3 [==] 100% Processing data chunk 2 of 3 [==] 100% Processing data chunk 3 of 3

Re: [Rd] custom allocators, Valgrind and uninitialized memory

2021-04-14 Thread Simon Urbanek
> Regards, > Andreas > > 2021-03-30 00:39 GMT+02:00 "Simon Urbanek" : >> Andres, >> >> correct me if I'm wrong, but the issue here is not initialisation but rather >> valgrind flagging. You simply have to call VALGRIND_MAKE_MEM_DEFINED() in >> yo

Re: [Rd] custom allocators, Valgrind and uninitialized memory

2021-04-14 Thread Simon Urbanek
Andres, correct me if I'm wrong, but the issue here is not initialisation but rather valgrind flagging. You simply have to call VALGRIND_MAKE_MEM_DEFINED() in your code after allocVector3() to declare that you have initialised the memory - or am I missing something? Cheers, Simon > On

Re: [Rd] boneheaded BLAS questions

2021-03-17 Thread Simon Urbanek
Ben, possibly useful project related to this https://github.com/staticfloat/libblastrampoline which is what Dirk referred to as the Julia state of art. It is actually much more complex than it sounds because of differences in naming and ABI between BLAS implementations, so simple switches don't

Re: [Rd] inheritance and attach

2021-03-15 Thread Simon Urbanek
Terry, NEWS: CHANGES IN R 4.0.0 NEW FEATURES \item S3 method lookup now by default skips the elements of the search path between the global and base environments. If you use attach(), S3 methods are hence no longer dispatched to (because it is between global and base) unless you

Re: [Rd] An argument promise containing bytecode?

2021-03-07 Thread Simon Urbanek
Taras, I don't think this has anything to do with promises, rather it is called Just-In-Time (JIT) compilation - see ?enablleJIT in R, it is enabled by default, so the function will be compiled on second use. Cheers, Simon > On Mar 7, 2021, at 11:12 PM, Taras Zakharko wrote: > > Dear all,

Re: [Rd] Apple M1 CRAN checks

2021-02-28 Thread Simon Urbanek
Paul, this is being worked on. As you can imagine testing over 17,000 package in a M1 Mac mini isn't quite trivial. The first priority was to get the nightly R builds to work. Second was to get CRAN package builds to work. Third is to provide checks. The first two have finished last week and

Re: [Rd] Checking multiple inheritance of S4 objects using R's C API

2021-02-15 Thread Simon Urbanek
Emre, inherits() was designed for S3 classes and at C level only ever works for S3 classes. In S4 world you should use is(). There is no equivalent C-level API for is() so, unfortunately, you likely have to use Rf_eval() of is(x, "class"). At low-level there is R_S4_extends() which allows

Re: [Rd] Request for a crop option on R's standard plot context menu

2021-02-12 Thread Simon Urbanek
Toby, R provides more convenient ways for this - using window devices for any output other than screen is not its intended function. I would recommend using the off-screen devices devices such as pdf() or png() to generate output which also gives you far more control. Also please note that the

Re: [Rd] Unexpected behavior with inheritance and using S3 classes as slots in S4 class

2021-01-28 Thread Simon Urbanek
Ezra, I think it's just the fact the you specified the wrong class inheritance in setOldClass() - it has to match you S3 definition, so it should be: setOldClass(c("b","a")) In which case it works: > n(s1 = b_1) An object of class "n" Slot "s1": [1] "world" attr(,"class") [1] "b" "a" Cheers,

Re: [Rd] parallel PSOCK connection latency is greater on Linux?

2020-11-03 Thread Simon Urbanek
ency- or > throughput-sensitive application? > > Best, > Jeff > > On Mon, Nov 2, 2020 at 14:05, Iñaki Ucar wrote: >> On Mon, 2 Nov 2020 at 02:22, Simon Urbanek >> wrote: >>> It looks like R sockets on Linux could do with TCP_NODELAY -- without >>> (s

Re: [Rd] parallel PSOCK connection latency is greater on Linux?

2020-11-01 Thread Simon Urbanek
It looks like R sockets on Linux could do with TCP_NODELAY -- without (status quo): Unit: microseconds expr min lq mean median uq max clusterEvalQ(cl, iris) 1449.997 43991.99 43975.21 43997.1 44001.91 48027.83 neval 1000 exactly the same machine

Re: [Rd] New URL redirect checks

2020-09-16 Thread Simon Urbanek
I can't comment for CRAN, but generally, shorteners are considered security risk so regardless of the 301 handling I think flagging those is a good idea. Also I think it is particularly bad to use them in manuals because it hides the target so the user has no idea what hey will get. Cheers,

Re: [Rd] CRAN metadata broken?

2020-09-15 Thread Simon Urbanek
$ ls -l stringi* -rw-r--r-- 1 pkgbuild admin 13641892 Sep 10 06:29 stringi_1.5.3.tgz so I guess there was a new version and the CRAN sync didn't finish yet when Gábor checked? Cheers, Simon [PS: please consider using CRAN or R-SIG-Mac since this is not related to R development.] > On Sep

Re: [Rd] Managing unix signal in R

2020-08-14 Thread Simon Urbanek
What do you mean by "manage unix signal"? The main signals like INT, PIPE or SEGV are handled by R and are not exposed to the user code. What exactly do you intend to do? Cheers, Simon > On Aug 14, 2020, at 6:44 PM, neonira Arinoem wrote: > > Hello > > Just wondering what is the best way

Re: [Rd] Experimental CI tool for R

2020-07-23 Thread Simon Urbanek
Jeroen, This is great! It is definitely a good basis to build on. However, I wonder why your macOS setup is so extremely stripped down (not even Cairo, tcltk nor X11 - and not TeX, either) and as far from what we actually use as possible (using gcc instead of clang, openblas etc.). How do

Re: [Rd] Invisible names problem

2020-07-22 Thread Simon Urbanek
Very interesting: > .Internal(inspect(k[i])) @10a4bc000 14 REALSXP g0c7 [ATT] (len=2, tl=0) 1,2,3,4,1,... ATTRIB: @7fa24f07fa58 02 LISTSXP g0c0 [REF(1)] TAG: @7fa24b803e90 01 SYMSXP g0c0 [MARK,REF(5814),LCK,gp=0x6000] "names" (has value) @10a4e4000 16 STRSXP g0c7 [REF(1)]

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

2020-07-19 Thread Simon Urbanek
Mario, On unix if you use Rseve you can pre-load all packages in the server (via eval config directive or by running Rserve::run.Rserve() from a session that has everything loaded) and all client connections will have the packages already loaded and available* immediately. You could replace

Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

2020-06-12 Thread Simon Urbanek
ian Ripley wrote: > >> On 12/06/2020 03:49, Fox, John wrote: >> Dear Simon, >>> On Jun 11, 2020, at 9:00 PM, Simon Urbanek >>> wrote: >>> >>> Wayne, >>> >>> that one is unrelated, but interesting - you can fix it with >>>

Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

2020-06-11 Thread Simon Urbanek
any offending chunks with writePNG("test.png",readPNG("exIf.png", TRUE,TRUE)) then the output work with tcltk. Cheers, Simon > On 12/06/2020, at 1:00 PM, Simon Urbanek wrote: > > Wayne, > > that one is unrelated, but interesting - you can fix it with

Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

2020-06-11 Thread Simon Urbanek
Wayne, that one is unrelated, but interesting - you can fix it with sudo install_name_tool -change \ /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \ /usr/local/lib/libtk8.6.dylib \ /usr/local/bin/wish8.6 There is a bug in tcltk with IDs on the libraries which I have worked-around for R,

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

2020-06-09 Thread Simon Urbanek
t almost > certainly not for a hotfix release. > > Best > -pd > >> On 10 Jun 2020, at 00:50 , Simon Urbanek wrote: >> >> To be clear, this not an issue in the libraries nor R, the certificates on >> the server were simply wrong. So, no, th

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

2020-06-09 Thread Simon Urbanek
To be clear, 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 AM, Henrik Bengtsson > wrote: > > Was this resolved upstream or is this something that R should/could >

Re: [Rd] GCC warning

2020-05-23 Thread Simon Urbanek
Adrian, newer compilers are better at finding bugs - you may want to read the full trace of the error, it tells you that you likely have a memory overflow when using strncpy() in your package. You should check whether it is right. Unfortunately we can’t help you more specifically, because I

<    1   2   3   4   5   6   7   8   9   10   >