[Rd] Print output during long tests?

2015-05-04 Thread Toby Hocking
I am the author of R package animint which uses testthat for unit tests. This means that there is a single test file (animint/tests/testthat.R) and during R CMD check we will see the following output * checking tests ... Running ‘testthat.R’ I run these tests on Travis, which has a policy that

[Rd] mclapply memory leak?

2015-09-02 Thread Toby Hocking
Dear R-devel, I am running mclapply with many iterations over a function that modifies nothing and makes no copies of anything. It is taking up a lot of memory, so it seems to me like this is a bug. Should I post this to bugs.r-project.org? A minimal reproducible example can be obtained by first

Re: [Rd] mclapply memory leak?

2015-09-04 Thread Toby Hocking
gt; wrote: > Toby, > > > On Sep 2, 2015, at 1:12 PM, Toby Hocking <tdho...@gmail.com> wrote: > > > > Dear R-devel, > > > > I am running mclapply with many iterations over a function that modifies > > nothing and makes no copies of anything. It is

Re: [Rd] mclapply memory leak?

2015-09-03 Thread Toby Hocking
the garbage collector touches objects, as pointed out by Radford Neal > here: > http://r.789695.n4.nabble.com/Re-R-devel-Digest-Vol-149-Issue-22-td4710367.html > > If so, I don't think this would be easily avoidable, but there may be > mitigation strategies. > > ~G > > On

[Rd] Un-informative Error in re-building vignettes

2017-11-29 Thread Toby Hocking
I am getting the following on CRAN windows and winbuilder https://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/penaltyLearning-00check.html Apparently there is an error in re-building vignettes, but I do not have any idea what it is, because all that is listed is three dots (...).

[Rd] Bug: time complexity of substring is quadratic as string size and number of substrings increases

2019-02-20 Thread Toby Hocking
Hi all, (and especially hi to Tomas Kalibera who accepted my patch sent yesterday) I believe that I have found another bug, this time in the substring function. The use case that I am concerned with is when there is a single (character scalar) text/subject, and many substrings to extract. For

Re: [Rd] Bug: time complexity of substring is quadratic as string size and number of substrings increases

2019-02-20 Thread Toby Hocking
-substring-bug.R To me this is a clear indication of a bug in substring, but again it would be nice to have some feedback/confirmation before posting on bugzilla. Also this suggests a fix -- just need to copy whatever stringi::stri_sub is doing. On Wed, Feb 20, 2019 at 11:16 AM Toby Hocking wrote

[Rd] patch for gregexpr(perl=TRUE)

2019-02-19 Thread Toby Hocking
Hi all, Several people have noticed that gregexpr is very slow for large subject strings when perl=TRUE is specified. - https://stackoverflow.com/questions/31216299/r-faster-gregexpr-for-very-large-strings -

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-30 Thread Toby Hocking
Jan Gorecki wrote: > Hi Toby, > AFAIK it has not been addressed in R. You can handle the problem on > your package side, see > https://github.com/Rdatatable/data.table/pull/3237 > Regards, > Jan > > > On Thu, May 30, 2019 at 4:46 AM Toby Hocking wrote: > > >

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-31 Thread Toby Hocking
the > >error: "make_RAW_from_NA_LLINT" not available for .Call() for package > "S4Vectors" > > later on when trying to load the package. > > Cheers, > H. > > > On 5/30/19 16:31, Toby Hocking wrote: > > thanks for the tip Jan. > > >

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-06-06 Thread Toby Hocking
If anybody else has this issue, please add a comment on https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17478 so we are more likely to get R-core to address this. Thanks Toby On Tue, Jun 4, 2019 at 2:58 PM Pages, Herve wrote: > On 5/31/19 08:41, Toby Hocking wrote:... > > In m

[Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-05-29 Thread Toby Hocking
Hi all, I am having an issue related to installing packages on windows with R-3.6.0. When installing a package that is in use, I expected R to stop with an error. However I am getting a warning that the DLL copy was not successful, but the overall package installation IS successful. This is quite

[Rd] R CMD build should fail early for old package versions?

2019-09-30 Thread Toby Hocking
Hi all, Today I had an R CMD build that failed while building a vignette because the vignette needs tidyr (>= 1.0, declared in DESCRIPTION Suggests) but my system had a previous version installed. It did not take me too long to figure out the issue (solved by upgrading tidyr) but it would have

[Rd] stats::reshape quadratic in number of input columns

2019-10-30 Thread Toby Hocking
Hi R-core, I have been performance testing R packages for wide-to-tall data reshaping and for the most part I see they differ by constant factors. However in one test, which involves converting into multiple output columns, I see that stats::reshape is in fact quadratic in the number of input

Re: [Rd] add jsslogo.jpg to R sources?

2020-01-10 Thread Toby Hocking
hi there, thanks for the feedback, sorry about the cross-posting, and that makes sense given the nojss option, which I was not aware of. On Wed, Jan 8, 2020 at 9:16 AM Achim Zeileis wrote: > On Wed, 8 Jan 2020, Iñaki Ucar wrote: > > > On Wed, 8 Jan 2020 at 19:21, Toby Ho

[Rd] add jsslogo.jpg to R sources?

2020-01-08 Thread Toby Hocking
Hi R-core, I was wondering if somebody could please add jsslogo.jpg to the R sources? (as I reported yesterday in this bug) https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17687 R already includes jss.cls which is the document class file for Journal of Statistical Software. Actually, for the

[Rd] docs about _R_CHECK_FORCE_SUGGESTS_ ?

2020-05-13 Thread Toby Hocking
Can someone please add documentation for that environment variable to Writing R Extensions? An appropriate place would be section https://cloud.r-project.org/doc/manuals/r-release/R-exts.html#Suggested-packages which already discusses _R_CHECK_DEPENDS_ONLY_=true [[alternative HTML version

Re: [Rd] docs about _R_CHECK_FORCE_SUGGESTS_ ?

2020-05-16 Thread Toby Hocking
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

[Rd] Stale link from ?check to R Internals

2020-08-19 Thread Toby Hocking
Hi the reference to R Internals https://cran.r-project.org/doc/manuals/r-release/R-ints.html#Tools in ?check (PkgUtils.Rd in utils package) is stale. Here is my proposed patch (use named reference rather than numeric reference to avoid any similar broken links in the future). Index:

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

2020-08-19 Thread Toby Hocking
Hi win-builder certificate expired on Aug 15. My student on the other side of the world is also seeing this problem so I think it needs to be fixed... > download.file("https://win-builder.r-project.org;, "/tmp/wb.html") trying URL 'https://win-builder.r-project.org' Error in

Re: [Rd] Specifying C Standard in Package's Makevars File

2020-09-28 Thread Toby Hocking
WRE explains for C++11 14 etc standards but I don't know about C https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code BTW I believe this question would be more appropriate for R-package-devel. On Mon, Sep 28, 2020 at 4:44 AM Andreas Kersting wrote: > Hi, > >

Re: [Rd] HELPWANTED keyword in bugs.r-project.org

2020-08-11 Thread Toby Hocking
Hi Luke, I just wanted to say thanks for taking the time to add this tag. That is very helpful to know which bugs are worth working on and need help. Keep up the good work! Toby On Wed, Aug 5, 2020 at 7:23 AM wrote: > Just a quick note to mention that we have added a HELPWANTED keyword > on

[Rd] Error in substring: invalid multibyte string

2020-06-26 Thread Toby Hocking
Hi all, I'm getting the following error from substring: > substr("Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) Error in substr("Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) : invalid multibyte string at 'gel-A<6b>iyoshi' Is that normal / intended? I've tried setting the Encoding/locale to Latin-1/UTF-8

Re: [Rd] Error in substring: invalid multibyte string

2020-06-27 Thread Toby Hocking
wrote: > On Fri, 26 Jun 2020 15:57:06 -0700 > Toby Hocking wrote: > > >invalid multibyte string at 'gel-A<6b>iyoshi' > > >https://stat.ethz.ch/pipermail/r-devel/1999-November/author.html > > The server says that the text is UTF-8: > > curl -sI \ >

Re: [Rd] valgrind false positive on R startup?

2020-06-18 Thread Toby Hocking
mtests/README.txt . Set > suppressions in ~/.valgrindrc, e.g. the CRAN check machine has > > --suppressions=/data/blackswan/ripley/wcsrtombs.supp > > It is an issue in your OS (glibc), not TRE nor R. > > On 10/06/2020 00:21, Toby Hocking wrote: > > Hi all, > > > >

[Rd] valgrind false positive on R startup?

2020-06-09 Thread Toby Hocking
Hi all, I'm on Ubuntu 18.04, running R-4.0.0 which I compiled from source, and using valgrind I am always seeing the following message. Does anybody else see that? Is that a known false positive? Any ideas how to fix/suppress? Seems related to TRE, do I need to upgrade that? (base)

Re: [Rd] [External] Possible ALTREP bug

2021-06-16 Thread Toby Hocking
By the way, where is the documentation for INTEGER_ELT, REAL_ELT, etc? I looked in Writing R Extensions and R Internals but I did not see any mention. REAL_ELT is briefly mentioned on https://svn.r-project.org/R/branches/ALTREP/ALTREP.html Would it be possible to please add some mention of them to

Re: [Rd] [External] Possible ALTREP bug

2021-06-17 Thread Toby Hocking
_t i, SEXP v); > > So the indexing is with R_xlen_t and they return the value itself as one > would expect. > > Cheers, > Simon > > > > On Jun 17, 2021, at 2:22 AM, Toby Hocking wrote: > > > > By the way, where is the documentation for INTEGER_ELT, REAL_ELT,

[Rd] NEWS item for bugfix in normalizePath and file.exists?

2021-04-27 Thread Toby Hocking
Hi all, Today I noticed bug(s?) in R-4.0.5, which seem to be fixed in R-devel already. I checked on https://developer.r-project.org/blosxom.cgi/R-devel/NEWS and there is no mention of these changes, so I'm wondering if they are intentional? If so, could someone please add a mention of the bugfix

Re: [Rd] NEWS item for bugfix in normalizePath and file.exists?

2021-04-28 Thread Toby Hocking
d prefer some stricter checks of strings validity and > perhaps disallowing the "C" encoding in R, so yet another behavior where > it would be clearer that this cannot really work, but that would require > more thought and effort. > > Best > Tomas > > > On 4/27/21 9

Re: [Rd] NEWS item for bugfix in normalizePath and file.exists?

2021-04-28 Thread Toby Hocking
at 9:04 AM Tomas Kalibera wrote: > > On 4/28/21 5:22 PM, Martin Maechler wrote: > >>>>>> Toby Hocking > >>>>>> on Wed, 28 Apr 2021 07:21:05 -0700 writes: > > > Hi Tomas, thanks for the thoughtful reply. That makes sense about >

Re: [Rd] na.omit inconsistent with is.na on list

2021-08-14 Thread Toby Hocking
gt; > > Following Toby's argument, it's clear to me: the first and the last. > > > > Iñaki > > > > > (in the sense of is.atomic returning \code{TRUE})" in front of > "vectors" > > > or similar where what types of objects are supported seems justified, &g

Re: [Rd] na.omit inconsistent with is.na on list

2021-08-16 Thread Toby Hocking
t > equivalent to the conceptual task na.omit is doing, in my opinion, as > illustrated by what the data.frame method does. > > Thus what i was getting at above about it not being clear that lst[is.na(lst)] > being the correct thing for na.omit to do > > ~G > > ~G > >

Re: [Rd] na.omit inconsistent with is.na on list

2021-08-12 Thread Toby Hocking
imilar where > what types of objects are supported seems justified, though, imho, as the > current documentation is either ambiguous or technically incorrect, > depending on what we take "vector" to mean. > > Best, > ~G > > On Wed, Aug 11, 2021 at 10:16 PM Toby Hocking wr

Re: [Rd] na.omit inconsistent with is.na on list

2021-08-11 Thread Toby Hocking
= chr "AsIs" > is.na(f) L [1,] FALSE [2,] TRUE [3,] FALSE > na.omit(f) L 1 2 NA 3 0 On Wed, Aug 11, 2021 at 9:58 PM Toby Hocking wrote: > na.omit is documented as "na.omit returns the object with incomplete cases > removed." and "At present these will hand

[Rd] na.omit inconsistent with is.na on list

2021-08-11 Thread Toby Hocking
na.omit is documented as "na.omit returns the object with incomplete cases removed." and "At present these will handle vectors," so I expected that when it is used on a list, it should return the same thing as if we subset via is.na; however I observed the following, > L <- list(NULL, NA, 0) >

Re: [Rd] Bug in PCRE interface code

2023-09-05 Thread Toby Hocking
BTW this is documented here http://pcre.org/current/doc/html/pcre2api.html#infoaboutpattern with a helpful example, copied below. As a simple example of the name/number table, consider the following pattern after compilation by the 8-bit library (assume PCRE2_EXTENDED is set, so white space -

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

2023-10-11 Thread Toby Hocking
Hi Michael, it sounds like you don't want to use a CRAN package for this, but you may try re2, see below. > grepl("(invalid","subject",perl=TRUE) Error in grepl("(invalid", "subject", perl = TRUE) : invalid regular expression '(invalid' In addition: Warning message: In grepl("(invalid",

Re: [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-09-22 Thread Toby Hocking
Another option is to use https://emacspeak.sourceforge.net/ (version of emacs editor/ide which can speak letters/words/lines -- has a blind maintainer) with https://ess.r-project.org/ (interface for editing and running R code from within emacs) On Thu, Sep 22, 2022 at 9:42 AM Duncan Murdoch

Re: [Rd] `dendrapply` Enhancements

2023-02-24 Thread Toby Hocking
Hi Aidan, I think you are on the right email list. I'm not R-core, but this looks like an interesting/meaningful/significant contribution to base R. I'm not sure what the original dendrapply looks like in terms of code style (variable names/white space formatting/etc) but in my experience it is

[Rd] read.csv quadratic time in number of columns

2023-03-29 Thread Toby Hocking
Dear R-devel, A number of people have observed anecdotally that read.csv is slow for large number of columns, for example: https://stackoverflow.com/questions/7327851/read-csv-is-extremely-slow-in-reading-csv-files-with-large-numbers-of-columns I did a systematic comparison of read.csv with

[Rd] write.csv performance improvements?

2023-03-29 Thread Toby Hocking
Dear R-devel, I did a systematic comparison of write.csv with similar functions, and observed two asymptotic inefficiencies that could be improved. 1. write.csv is quadratic time (N^2) in the number of columns N. Can write.csv be improved to use a linear time algorithm, so it can handle CSV files

Re: [Rd] strcapture performance when perl = TRUE

2024-02-13 Thread Toby Hocking
wing a very > nice substring approach that I've seen implemented by Toby Hocking > in the nc package - nc::capture_first_vec). > > strcapture2 <- function(pattern, x, proto, perl = FALSE, useBytes = FALSE) { > if (isTRUE(perl)) { > m <- regexpr(pattern

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-19 Thread Toby Hocking
Hi Hilmar and Ivan, I have used your code examples to write a blog post about this topic, which has figures that show the asymptotic time complexity of the various approaches, https://tdhock.github.io/blog/2023/df-partial-match/ The asymptotic complexity of partial matching appears to be quadratic

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-19 Thread Toby Hocking
Hi Hilmar and Ivan, I have used your code examples to write a blog post about this topic, which has figures that show the asymptotic time complexity of the various approaches, https://tdhock.github.io/blog/2023/df-partial-match/ The asymptotic complexity of partial matching appears to be quadratic

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

2024-01-29 Thread Toby Hocking
My opinion is that the proposed feature would be greatly appreciated by users. I had always wondered if I was the only one doing paste(readLines(f), collapse="\n") all the time. It would be great to have the proposed, more straightforward way to read the whole file as a string:

Re: [R-pkg-devel] SystemRequirements: Berkeley DB STL

2018-10-24 Thread Toby Hocking
Hi Dirk thanks for the helpful response. On Wed, Oct 24, 2018 at 5:09 AM Dirk Eddelbuettel wrote: > > On 23 October 2018 at 14:02, Toby Hocking wrote: > | I would like to put the https://github.com/tdhock/PeakSegDisk package on > | CRAN. This package needs Berkeley DB C++ Stand

[R-pkg-devel] unicode WARNING on solaris?

2019-09-23 Thread Toby Hocking
Hi all, is there a known fix for this WARNING which I am getting on solaris for my newly submitted nc package? https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/nc-00check.html A quick google search for "it is not known that wchar_t is Unicode on this platform cran" shows that many

Re: [R-pkg-devel] unicode WARNING on solaris?

2019-10-16 Thread Toby Hocking
tdata", "file_with_unicode.txt", package="yourPkg")) On Wed, Sep 25, 2019 at 11:45 AM Tomas Kalibera wrote: > On 9/25/19 7:59 PM, Toby Hocking wrote: > > Hi Tomas thanks for the explanation. Does that mean that there is no known > fix? i.e. it is OK to re-submit a new version of

Re: [R-pkg-devel] unicode WARNING on solaris?

2019-09-25 Thread Toby Hocking
Hi Tomas thanks for the explanation. Does that mean that there is no known fix? i.e. it is OK to re-submit a new version of my package without fixing these WARNINGS? On Tue, Sep 24, 2019 at 1:38 AM Tomas Kalibera wrote: > On 9/24/19 1:57 AM, Toby Hocking wrote: > &g

Re: [R-pkg-devel] Help in getting past CRAN submission rejections

2020-09-09 Thread Toby Hocking
Hi Naras I had a similar issue recently with https://cloud.r-project.org/web/packages/nc/ --- it Suggests: re2r which is a package that is no longer on CRAN, but available on github. To solve the issue I just copied the re2r into a drat repo, which is a CRAN-like repository hosted on github. More

Re: [R-pkg-devel] Passing CRAN checks for a package linking to a system library on CRAN machines

2021-05-18 Thread Toby Hocking
Hi Tomas, these are really helpful suggestions, which are not at all discussed in the current Writing R Extensions, nor in CRAN Repository Policy. Would you please consider adding this information to one of these official sources of documentation? On Fri, May 14, 2021 at 3:59 AM Tomas Kalibera

Re: [R-pkg-devel] Re-building vignettes had CPU time 9.2 times elapsed time

2023-08-25 Thread Toby Hocking
Thanks Dirk. I agree. data.table is not in a situation to update very soon, so the easiest solution for the R community would be for CRAN to set OMP_THREAD_LIMIT to 2 on the Windows and Debian machines doing this test. Otherwise the 1400+ packages with hard dependencies on data.table will each