Re: [R-pkg-devel] Export everything whose name does not start with ".".

2024-03-15 Thread Hugh Parsonage
It would have been helpful for that person to specify their candidate regex, rather than just saying it could be simpler. That out of the way, I believe exportPattern("^[^.]") would be sufficient since the square brackets remove any special meaning the dot has. For an alternative, given the

[R-pkg-devel] Additional Issues: Intel

2024-01-16 Thread Hugh Parsonage
My package grattan fails the Intel[1] check with Error: segfault from C stack overflow I am unable to immediately see where in the test suite this error has occurred. I seek advice on how to fix this error. The only hunch I have is that the package uses C code and includes structs with

Re: [R-pkg-devel] checking CRAN incoming feasibility

2024-01-15 Thread Hugh Parsonage
> Surely the software just has to check that there is web connection to a CRAN mirror. Nope! The full code is in tools:::.check_package_CRAN_incoming (the body of which filled up my entire console), but to name a few checks it has to do: check that the name of the package is not the same as any

[R-pkg-devel] Canonical way to Rprintf R_xlen_t

2023-11-28 Thread Hugh Parsonage
ld", (long long) xlength(x)); Rprintf("%td, xlength(x)); or using the string macro found in Mr Kalibera's commit of r85641: R_PRIdXLEN_T Which would be most advisable for my update, required in the next fortnight? Hugh Parsonage __ R-package-devel@r

Re: [R-pkg-devel] How to identify what flags "Additional Issues" for UBSAN

2023-03-23 Thread Hugh Parsonage
In line https://github.com/alarm-redist/redist/blob/f1ed042841469456c1d8c149092bc818e2a5c1a5/src/wilson.cpp#L165 int max_try = 50 * remaining * ((int) std::log(remaining)); you need to ensure remaining > 0. At some point it became -1. On Thu, 23 Mar 2023 at 22:07, Ivan Krylov wrote: > > В

Re: [R-pkg-devel] [UNCLASSIFIED] Remotes in description when submitting a package until a dependency is fixed

2022-11-15 Thread Hugh Parsonage
I think you've misunderstood that excerpt. By "temporary development state", it means _between_ CRAN releases; packages in a development state are not suitable for CRAN, as the policy states: > CRAN hosts packages of publication quality and is not a development platform. You'll need to stop

[Rd] "getOption(max.print) omitted %d entries" may be negative

2021-12-28 Thread Hugh Parsonage
In src/main/printvector.c in the definition of printVector and printNamedVector (and elsewhere): Rprintf(" [ reached getOption(\"max.print\") -- omitted %d entries ]\n", n - n_pr); Though n - n_pr is of type R_xlen_t so may not be representable as int. In practice negative values may be

Re: [R-pkg-devel] Best way to cache a dataframe available for all functions in a package

2021-11-26 Thread Hugh Parsonage
Agreed. One can also initialise such an environment as a package option in .onLoad which may be better or worse depending in part on how much restriction you want to place on the environment On Sat, 27 Nov 2021 at 12:41 am, Lionel Henry wrote: > Hello, > > The trick is to store cached objects

[R-pkg-devel] S3 is.unsorted registration

2021-09-09 Thread Hugh Parsonage
and source code I note that if I omit the na.rm = argument I will get the intended result (I was drawn to the solution by noting the .Internal call has omitted it) but I'm wondering whether this is correct. Best, Hugh Parsonage. __ R-package-devel@r-p

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

2021-08-13 Thread Hugh Parsonage
The data.frame method deliberately skips non-atomic columns before invoking is.na(x) so I think it is fair to assume this behaviour is intentional and assumed. Not so clear to me that there is a sensible answer for list columns. (List columns seem to collide with the expectation that in each

Re: [R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Hugh Parsonage
What is the behaviour of %while% if not preceded by an expression wrapped in do() ? On Wed, 11 Aug 2021 at 1:26 pm, Andrew Simmons wrote: > Hello, > > > I've written two functions to emulate do while/until loops seen in other > languages, but I'm having trouble documenting its usage. The

Re: [R-pkg-devel] Using parallel:::sendMaster despite warnings

2021-07-23 Thread Hugh Parsonage
Happily, package parallel is open-source. If you would like to make use of the unexported functions, you could copy the source code with acknowledgement into your package. Naturally this might be a lot of work and risks different behaviour between your package and parallel, but neither might be

Re: [R-pkg-devel] OpenMP on MacOS

2021-06-07 Thread Hugh Parsonage
Ensure you surround all your omp pragmas like so: #ifdef _OPENMP #pragma omp parallel ... #endif Essentially, detecting the operating system is not enough -- you need to condition your use of OpenMP if and only if _OPENMP is available. You should also do the same for #if _OPENMP #include

Re: [R-pkg-devel] Finding dependencies (Was: problem with submitting to CRAN (windows))

2021-06-02 Thread Hugh Parsonage
te: > > On 02/06/2021 6:57 a.m., Hugh Parsonage wrote: > > mvSLOUCH <--- TreeSim <-- phytools <-- gtools > > > > On Wed, 2 Jun 2021 at 20:35, Krzysztof Bartoszek > > wrote: > >> > >> Thank you. The only problem, as I wrote, is that neither m

Re: [R-pkg-devel] problem with submitting to CRAN (windows)

2021-06-02 Thread Hugh Parsonage
in mvSLOUCH do I use any call to anything from gtools > nor to any function called combinations. > > Best wishes > Krzysztof Bartoszek > > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Wednesday, June 2, 2021 10:25 AM, Hugh Parsonag

Re: [R-pkg-devel] problem with submitting to CRAN (windows)

2021-06-02 Thread Hugh Parsonage
Probably a consequence of gtools having build errors (https://cran.r-project.org/web/checks/check_results_gtools.html) I'd recommend reconsidering use of the package until the problems are resolved. In the meantime, put gtools is Suggests for the use of combinations(). Note the base R functions

Re: [R-pkg-devel] \donttest{} and writing outputs to tempdir()

2021-06-01 Thread Hugh Parsonage
Are you able to provide a link to your package? It's a bit hard to guess what's causing your examples etc to have these problems. On Wed, 2 Jun 2021 at 14:40, Danielle Maeser wrote: > > Hello, > > I received the following comments from a CRAN maintainer, and I don't > understand why they were

[R-pkg-devel] Valgrind warning: invalid size of 4, is it due to a simple overrun?

2021-06-01 Thread Hugh Parsonage
Hello, I received a valgrind warning about my package, hutilscpp, from CRAN (thank you). I believe I've tracked down and fixed the problem, but I wasn't able to reproduce the error on rhub (including with --leak-check=full etc) so I'd like to know if I'm missing something. The valgrind warning

Re: [R-pkg-devel] Problems with too much testing

2021-04-16 Thread Hugh Parsonage
My 2c is that if a package has actually tested something like that (say, the ordering of a list's elements), then it is 100% likely that a script out there depends on that behaviour too. In other words, the change is not inconsequential. R users are in debt to package developers but I think it

[Rd] nchar(x, type = "bytes") seems slower than it could be

2021-03-30 Thread Hugh Parsonage
While profiling some C code, I rolled my own nchar function which appears to be much faster than base R's (25 times faster for a 10M length vector). Obviously base::nchar provides significantly more features than my barebones function (C snippet below); however, for argument type = "bytes" it

[Rd] Does type raw really have no ordering?

2021-02-08 Thread Hugh Parsonage
In the help for Extremes ?min > Note that all versions fail for raw and complex vectors since these have no > ordering. This makes sense for complex vectors, yet `raw` vectors seem to have a natural order. Indeed: which.min(as.raw(c(5L, 2L, 1L, 99L))) works and would identify the minimum.

Re: [Rd] New pipe operator

2020-12-05 Thread Hugh Parsonage
I'm surprised by the aversion to mtcars |> nrow over mtcars |> nrow() and I think the decision to disallow the former should be reconsidered. The pipe operator is only going to be used when the rhs is a function, so there is no ambiguity with omitting the parentheses. If it's disallowed, it

Re: [Rd] [External] exists, get and get0 accept silently inputs of length > 1

2020-11-16 Thread Hugh Parsonage
I noticed the recent commit to R-dev (r79434). Is this wise? I've often used get() in constructions like for (j in ls()) if (is.numeric(x <- get(j))) ... (and often interactively, rather than in a package) Am I to understand that get(j) will now be equivalent to `j` even if j is a string

Re: [R-pkg-devel] Warning on r-oldrel-macos-x86_64

2020-10-25 Thread Hugh Parsonage
If you click on WARN in the table on your check results page (i.e. if you go to ) you will see in the first line: * using R version 3.6.2 (2019-12-12) Hope that helps. On Sun, 25 Oct 2020 at 21:10, Helmut

Re: [R-pkg-devel] details of CRAN's r-devel-linux-x86_64-debian-clang

2020-10-25 Thread Hugh Parsonage
_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_ not R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_ (i.e. you seem to have dropped the initial underscore)? On Sun, 25 Oct 2020 at 20:01, Jan Gorecki wrote: > > Dear community, > > I am getting an error on CRAN on r-devel-linux-x86_64-debian-clang

Re: [R-pkg-devel] Licenses

2020-10-22 Thread Hugh Parsonage
It’s necessary but not sufficient to use a licence from license.db On Fri, 23 Oct 2020 at 3:12 am, Duncan Murdoch wrote: > On 22/10/2020 11:55 a.m., Marc Schwartz wrote: > > > > > >> On Oct 22, 2020, at 11:19 AM, Marc Schwartz > wrote: > >> > >> On Oct 22, 2020, at 10:21 AM, Kevin R. Coombes <

[R-pkg-devel] Tracking down cause of UBSAN error

2020-10-15 Thread Hugh Parsonage
Hello, I am getting a UBSAN-clang failure on my package hutilscpp (). However I cannot reproduce the error on rhub, nor can I see an obvious problem with the code. (Though obviously there is something wrong.) The testthat.Rout log from CRAN reads

Re: [Rd] How to use `[` without evaluating the arguments.

2020-09-25 Thread Hugh Parsonage
This works as expected: "[.foo" <- function(x, i, j) { sx <- substitute(x) si <- substitute(i) sj <- substitute(j) 100 * length(sx) + 10 * length(si) + length(sj) } x <- 1:10 class(x) <- "foo" x[y == z, a(x)] #> [1] 132 Note in your implementation you ask the function evaluate the

Re: [R-pkg-devel] installed package size problem on Mac but not Linux nor Windows

2020-09-22 Thread Hugh Parsonage
One of your vignettes is a 52-page pdf. It may be more suitable to provide a link to it rather than distributing it with the package, or distribute an excerpt. Some the images in the PDFs could be PDFs themselves, or be pngs with lower resolution. On Tue, 22 Sep 2020 at 5:04 pm, Spencer Graves <

Re: [Rd] Including full text of open source licenses in a package

2020-09-12 Thread Hugh Parsonage
Perhaps I have misread that excerpt from WRE, but my read is that package authors should not duplicate GNU COPYING, since it is present in all R distributions already when using GPL-2 and friends. It doesn't apply to packages distributed with other licenses. It should be noted that in GPL FAQ

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-09 Thread Hugh Parsonage
gt;> wrote: > >>> On 9/8/20 4:48 PM, Hugh Parsonage wrote: > >>>> Unfortunately I only get > >>>> > >>>> [Thread 21752.0x4aa8 exited with code 3221225477] > >>>> [Thread 21752.0x4514 exited with code 3221225477] > &

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-09 Thread Hugh Parsonage
R Under development (unstable) (2020-09-08 r79165) On Wed, 9 Sep 2020 at 18:00, Tomas Kalibera wrote: > > On 9/9/20 9:30 AM, Hugh Parsonage wrote: > > Thank you! > > > > I get > > > > Starting program: C:\R\R-devel-20200909\bin\x64\Rgui.exe > >

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-09 Thread Hugh Parsonage
. 0x6c72d206 in compact_intseq_Dataptr (x=0x12783350, writeable=) at altclasses.c:169 169 altclasses.c: No such file or directory. On Wed, 9 Sep 2020 at 17:03, Tomas Kalibera wrote: > > On 9/9/20 8:48 AM, Hugh Parsonage wrote: > > I am unable to set break or use gdb with any succes

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-09 Thread Hugh Parsonage
list might not be the best place to get a tutorial on using gdb on Windows. On Wed, 9 Sep 2020 at 07:47, Jeroen Ooms wrote: > > On Tue, Sep 8, 2020 at 11:44 PM Jeroen Ooms wrote: > > > > On Tue, Sep 8, 2020 at 5:20 PM Tomas Kalibera > > wrote: > > > &g

Re: [Rd] [External] Re: Operations with long altrep vectors cause segfaults on Windows

2020-09-08 Thread Hugh Parsonage
of R, or can R be debugged using gdb with an off-the-shelf installation?) On Wed, 9 Sep 2020 at 00:32, wrote: > > On Tue, 8 Sep 2020, Hugh Parsonage wrote: > > > Thanks Martin. On further testing, it seems that the segmentation > > fault can only occur when the amount

[Rd] Operations with long altrep vectors cause segfaults on Windows

2020-09-08 Thread Hugh Parsonage
I can only reproduce on Windows, but reliably (both 4.0.0 and 4.0.2): $> R --vanilla x <- c(0L, -2e9:2e9) # > Segmentation fault Tried to reproduce on Linux but the above worked as expected. Not an issue merely with the length of the vector; for example, x <- rep_len(1:10, 1e10) works, though

Re: [Rd] sum() vs cumsum() implicit type coercion

2020-08-25 Thread Hugh Parsonage
(If I may be so bold, although I think it's unlikely that a majority would be in favour of this change, and I doubt anyone is actually proposing it, I think quite a bit more than "a majority" should be required before a change like this should be allowed. Considering the feature that cumsum

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

2020-07-19 Thread Hugh Parsonage
My advice would be to avoid the network in one of the following ways 1. Store installed packages on your local drive 2. Copy the installed packages to a tempdir on your local drive each time the script is executed 3. Keep an R session running in perpetuity and source the scripts within that

Re: [R-pkg-devel] package CatDataAnalysis

2020-06-28 Thread Hugh Parsonage
If you’re not the author of the data, you can’t submit it as such. The website has a copyright message on it which, while not definitive, doesn’t suggest the use you’re proposing would be allowed. Bear in mind that you may expose CRAN not just yourself to liability if you try to conceal true

Re: [R-pkg-devel] Rbuildignore a file type from a top level directory only

2020-06-21 Thread Hugh Parsonage
Perhaps ^[^/]+\.R$ On Sun, 21 Jun 2020 at 22:31, Jan Gorecki wrote: > > Hi R developers, > > What is the proper way to define an entry in .Rbuildignore file to > exclude *.R files from a top level directory of R package? > Using ^.*\.R$ excludes every R script, including those in

Re: [R-pkg-devel] Including fst in inst/extdata

2020-04-30 Thread Hugh Parsonage
character columns to ASCII and changing the order of the columns changed the output of file to 'data'. Dropping a column also prevented the false identification. On Mon, 27 Apr 2020 at 22:12, Dirk Eddelbuettel wrote: > > > Hugh, > > On 27 April 2020 at 16:02, Hugh Parsonage wrote: &g

[R-pkg-devel] Including fst in inst/extdata

2020-04-27 Thread Hugh Parsonage
st/extdata/file.fst" I'm not sure whether this qualifies as a "rare false positive" as WRE mentions, but if it isn't is there a way to include fst files in a package without raising a warning? Hugh Parsonage. __ R-package-devel@r-proje

Re: [Rd] stringsAsFactors

2020-04-13 Thread Hugh Parsonage
Further, in addition to the `val <- FALSE` patch a few hours ago by Martin, the line after should also be changed - if(!is.logical(val) || is.na(val) || length(val) != 1L) + if(!is.logical(val) || length(val) != 1L || is.na(val)) ## Consider Sys.setenv("_R_CHECK_LENGTH_1_LOGIC2_" = "TRUE")

Re: [R-pkg-devel] note about dependency on archived package

2020-03-18 Thread Hugh Parsonage
The note is there to remind CRAN that the package previously had problems serious enough to warrant archival. Since you have solved the problem, you do not need to do anything else in your submission. On Wed, 18 Mar 2020 at 7:23 am, Gianmarco Alberti < gianmarcoalbe...@gmail.com> wrote: > Hello,

Re: [R-pkg-devel] GitHub problems

2020-03-14 Thread Hugh Parsonage
You published your token. You should revoke it. You probably don’t have the right permissions associated with git. On Sat, 14 Mar 2020 at 2:14 pm, Spencer Graves < spencer.gra...@effectivedefense.org> wrote: > Hello, All: > > >What do you suggest Jim Ramsay and I do to migrate the fda

Re: [R-pkg-devel] win-builder down?

2020-02-29 Thread Hugh Parsonage
Are CRAN staff located in Europe only? Is there a case to have a limited staff across multiple timezones with a rolling roster? Obviously if something is reported it’s best if it can be actioned immediately. On Sun, 1 Mar 2020 at 12:29 pm, Henrik Bengtsson wrote: > FYI, in past when queues got

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Hugh Parsonage
I mean if the person filing the bug regards style as more important than the truth of how R treats formulas then they’re literally talking in another language. I strongly recommend you do nothing or at most make a note in the documentation addressing this. Your time is too valuable. On Tue, 25

[Rd] Minor typo in recent commit

2020-02-11 Thread Hugh Parsonage
I believe should be February 2020 not 2010 --- a/doc/manual/R-exts.texi +++ b/doc/manual/R-exts.texi @@ -2631,9 +2631,9 @@ not necessarily installed) on all known @R{} platforms. As from @R{} 4.0.0 a C++ compiler will be selected only if it conforms to the 2011 standard (`C++11'). A minor

Re: [Rd] Development version of R fails tests and is not installed

2020-02-08 Thread Hugh Parsonage
The only observation I can make is that the change to round() was made in r77727 whereas your R-devel appears to be r77715 (so would not exhibit the fixed behaviour). My guess is that there was a perpetual installation failure after r77715 but that the test folder was still retrieved and used.

Re: [R-pkg-devel] function name conflict problem

2020-02-04 Thread Hugh Parsonage
Package karon is the problem. Is that package in your depends or imports? Does that package use Depends? On Wed, 5 Feb 2020 at 8:24 am, wrote: > In trying to develop a package to be submitted to CRAN, when I do Install > and Reload or devtools::check(), I get the warning: > > > > Warning:

Re: [R-pkg-devel] Error while checking if Pandoc is available

2019-12-06 Thread Hugh Parsonage
Change | to || On Fri, 6 Dec 2019 at 11:08 pm, Pere Millan Martinez wrote: > Yesterday the publication of the new brinton package war archived > (https://cran.r-project.org/web/packages/brinton/index.html) because the > following line produces the following error: > >

Re: [R-pkg-devel] Issue with Biostrings-- can't find the base rgb function on r-devel

2019-12-04 Thread Hugh Parsonage
rgb is from package grDevices not package base. On Thu, 5 Dec 2019 at 2:48 pm, Dalgleish, James (NIH/NCI) [V] via R-package-devel wrote: > Question: > > NIPTeR is experiencing new warnings when loading Biostrings. I have the > exact same warnings with my package, CNVScope. > > It seems a little

Re: [R-pkg-devel] roxygen2 7.0.1 backslash escape error

2019-11-30 Thread Hugh Parsonage
You could (a) install the updated roxygen from github and rebuild the man/ files ; (b) manually edit the Rd files without using roxygen ; or (c) remove the examples until you can apply the fix. On Sun, 1 Dec 2019 at 1:26 am, Yoni wrote: > I received a message from CRAN yesterday stating my

Re: [R-pkg-devel] Problem loading package on Windoze --- update.

2019-11-05 Thread Hugh Parsonage
I wonder if Dropbox “smartsync” is the culprit here. I’ve noticed this feature can create confusion between programs when Dropbox provides (a link to) the file when it is opened but only when it recognizes the file is being opened. On Tue, 5 Nov 2019 at 7:46 pm, Gábor Csárdi wrote: > I am not

Re: [Rd] Getting error in rbindlist

2019-11-01 Thread Hugh Parsonage
This is (was) a bug in data.table that is similar to one which was putatively closed. Recommend you update to the latest version and if the problem persists reopen the issue here https://github.com/Rdatatable/data.table/issues/3032 This mailing list is for R bugs, which this isn’t. R Core can no

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

2019-09-27 Thread Hugh Parsonage
You may be trying to do something similar to hutilscpp::which_first(x < 5) which does most of its work at the R level. That is notice an expression is of the form lhs operator rhs then evaluate each element of lhs separately On Fri, 27 Sep 2019 at 8:35 pm, Morgan Morgan wrote: > Hi, > > I am

Re: [R-pkg-devel] What counts as an API change?

2019-09-25 Thread Hugh Parsonage
> The approach I take is a major version increment is required if it > requires an existing unit test to be changed or if it requires a reverse > dependency to change a unit test. > > (With the exception of tests marked explicitly as unstable.) > > In my view the test suite is a good way to

Re: [Rd] R CMD check issue

2019-08-28 Thread Hugh Parsonage
The warning is that the vignette failed to be rebuilt due to an error in its code. The error log was truncated. Of course for practical purposes errors and warnings both constitute check failures On Thu, 29 Aug 2019 at 1:56 am, Therneau, Terry M., Ph.D. via R-devel < r-devel@r-project.org>

[Rd] Documenting else's greed

2019-08-16 Thread Hugh Parsonage
I was initially pretty shocked by the result in this question: https://stackoverflow.com/questions/57527434/when-do-i-need-parentheses-around-an-if-statement-to-control-the-sequence-of-a-f Briefly, the following returns 0, not 3 as might be expected: if (TRUE) { 0 } else { 2 } + 3 At

Re: [R-pkg-devel] R package manual failing only on R-devel-linux-x86_64-debian-gcc

2019-06-18 Thread Hugh Parsonage
Unfortunately this error is caused by a hyperlink straddling a page, so it’s difficult to solve uniformly. The LaTeX error message provides a clue as to where the hyperlink might be (near an \item near a \code) but no exact location. My advice would be to look where you have hyperlinks

Re: [R-pkg-devel] .Rd, LaTeX and Unicode

2019-06-18 Thread Hugh Parsonage
utf8x is deprecated https://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc#13070 On Tue, 18 Jun 2019 at 7:52 pm, Serguei Sokol wrote: > Hi, > > I am preparing a package where I would like to use UTF characters in .Rd > files. When the LaTeX comes to play, I got well known

Re: [Rd] [EXTERNAL] Re: survival changes

2019-06-01 Thread Hugh Parsonage
Would this not be the case *for* a new package? FWIW I would much prefer packages maintainers who make significant changes also change the name of the package (e.g. to survival2). That way disturbance is minimized and the package’s developers can add features and refactor their code much faster.

Re: [R-pkg-devel] CRAN student assistants

2019-05-15 Thread Hugh Parsonage
I can't speak for Hadley, but my read of his email was that CRAN has appointed new staff and while extra staff are clearly justified, it was unclear how they were appointed and whether they had equal seniority and authority as existing members. Indeed, the fact they use titles which are clearly

[Rd] Spurious warning from checkReplaceFuns about a non-replacement function

2019-03-09 Thread Hugh Parsonage
If a function contains the pattern `<-` it is (with a few exceptions) deemed to be a replacement function and in particular must have second argument `value` to pass R CMD check. Consider the function %<->% or any other function containing <- within grapes. I claim that such functions should not

[R-pkg-devel] Use of assignInNamespace in package

2019-02-07 Thread Hugh Parsonage
Hello, I'm considering a package submission. I have used assignInNamespace, which is hideous but seems better than the alternatives. I see that it returns a NOTE on R CMD check, suggesting that it is not absolutely prohibited, but would require justification. The justification I would make is

[Rd] Behaviour of exists(x) for length(x) > 1

2018-10-15 Thread Hugh Parsonage
It seems that exists accepts character vectors of lengths other than one, but discards all but the first element without an error or warning. Is this intended? The name "exists" is in the singular, so it's not surprising that it only contemplates the length-one instance but in the absence of an

Re: [Rd] ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1

2018-09-01 Thread Hugh Parsonage
I would add my support for the change. >From a cursory survey of existing code, I'd say that usage like `class(x) == 'y'` -- rather than inherits(x, 'y') or is.y -- is probably going to be the major source of new warnings. So perhaps in the NEWS item it could be noted as a clue for developers

[Rd] premature use of startsWith in r75110

2018-08-13 Thread Hugh Parsonage
In r75110 at line 1846 in src/library/tools/R/check.R the following line was changed - if(length(grep("^Found the defunct/removed function", out8))) + if(any(startsWith(out8, "Found the defunct/removed function"))) However, if `out8` is NULL at this point (which is plausible), the original

Re: [R-pkg-devel] Building my R package: issue when importing two functions with the same name

2018-08-07 Thread Hugh Parsonage
Does your package import or depend on 'GmAMisc'? This package appears to Depend on both spatstat and pROC. Alternatively you have imported both packages in your NAMESPACE. If neither of these clues help, could you post your DESCRIPTION and NAMESPACE files? Probably all we'd need. On 6 August

Re: [R-pkg-devel] Get an empty note for "checking DESCRIPTION meta-information" when I run devtools::build_win()

2018-07-24 Thread Hugh Parsonage
Thank you. Could you provide the contents of DESCRIPTION too? That might provide the richest clue. If you have a link to an online copy of the package that could be helpful too. On Wed, 25 Jul 2018 at 12:01 Eggleston, Barry wrote: > I am working through my first package submission. When I

Re: [R-pkg-devel] Versioning conventions

2018-07-10 Thread Hugh Parsonage
3.5.1.0 with the 4th number (0) for within-release changes. Lovely package by the way -- I was looking for it earlier this year but thought it had been lost! The link in the GitHub description appears broken, however. On 10 July 2018 at 23:59, David Hugh-Jones wrote: > Hi all, > > Just updated

Re: [Rd] Byte-compilation failure on different architectures / low-memory systems

2018-06-04 Thread Hugh Parsonage
I believe a reproducible example is to simply have a very large object defined literally (i.e. through structure() etc) in ./R/ . For example, fBasics has a couple of files test-jbLM.R and test-jbTable.R which are about 500 KB. For a given amount of RAM, I believe any sufficiently large file will

Re: [R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission bwt 1.1.0

2018-05-30 Thread Hugh Parsonage
Hi, There are a few problems with the submission. Probably more than can be resolved by people on the mailing list. Speaking generally, a WARNING in a CRAN check is something that *must* be fixed, rather than something which you can just acknowledge. The two warnings that you mentioned are that

[Rd] grDevices::grey could provide clearer error message when length(alpha) != length(level)

2018-05-10 Thread Hugh Parsonage
e.g. grDevices::grey(level = 0.1, alpha = c(0, 1)) #> Error in grey(level = 0.1, alpha = c(0, 1)) : #> attempt to set index 1/1 in SET_STRING_ELT Perhaps #> Error in grey(level = 0.1, alpha = c(0, 1)) : #> lengths of 'level' and 'alpha' differ __

Re: [Rd] Proposed speedup of ifelse

2018-05-07 Thread Hugh Parsonage
hat I saw, is to avoid as much and subsetting as we can. > If there are no NAs none of the test or test[ok] operations do anything > because ok has only TRUEs in it. Even when there are, we want to do the & > once and avoid test[ok]. > > There are further savings for the NAs pres

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-07 Thread Hugh Parsonage
I'd add my support for mode = "wb" to (eventually) become the default, though I respect Tomas's comments about backwards-compatibility. Instead of making the argument mandatory (which would immediately break scripts -- even ones that won't be helped by changing to mode = 'wb') or otherwise

Re: [Rd] Proposed speedup of ifelse

2018-05-03 Thread Hugh Parsonage
Thanks Radford. I concur with all your points. I've attempted to address the issues you raised through the github.io post. The new method appears to be slower for test lengths < 100 and possibly longer lengths (not just < 10). Of course length(test) < 100 is very quick, so I simply added this to

Re: [Rd] Proposed speedup of ifelse

2018-05-02 Thread Hugh Parsonage
yes, no)) + } +} +if (!is.null(attributes_of_test)) { + attributes(out) <- attributes_of_test +} + +out + } else { +return(.ifelse(test, yes, no)) + } +} + +.ifelse <- function(test, yes, no) { ans <- test ok <- !is.na(test) if (any(test[ok])) On

[Rd] Proposed speedup of ifelse

2018-05-02 Thread Hugh Parsonage
ded to reflect this. I've written up a short note detailing the performance improvements and some unit tests at https://hughparsonage.github.io/content/post/A-new-ifelse.html Best Hugh Parsonage __ R-devel@r-project.org mailing list https://stat.ethz.ch/mail

[Rd] Proposal to reduce check times by skipping GitHub pulls and issues URL checks

2018-03-21 Thread Hugh Parsonage
cal changes. Best, Hugh Parsonage. Grattan Institute __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[R-pkg-devel] Very large packages in Additional_repositories

2018-03-19 Thread Hugh Parsonage
Dear list, I'm considering submitting a package to CRAN. The package would be a 'foyer' or API to a much larger package (>1GB tarball) containing geographical data that the 'foyer' package would use to perform tasks like geocoding. The foyer package would be usable, though quite limited, as a

[Rd] Unclosed parenthesis in grep.Rd

2018-03-04 Thread Hugh Parsonage
Lines 129-131: \code{grep(value = FALSE)} returns a vector of the indices of the elements of \code{x} that yielded a match (or not, for \code{invert = TRUE}. This will be an integer vector unless the input There should be a closing parenthesis after \code{invert = TRUE}

Re: [R-pkg-devel] [FORGED] Re: How to (conditionally) use an archived package (without Suggests)?

2018-02-25 Thread Hugh Parsonage
Not to mention a drat repository you can just fork with a single click! On Mon, 26 Feb 2018 at 3:25 am, Dirk Eddelbuettel wrote: > > On 25 February 2018 at 15:00, Marius Hofert wrote: > | okay, so (afaik) this is just a github repos which contains an exact > | copy of the github

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Hugh Parsonage
The relevant part of the repository policy: > Packages on which a CRAN package depends should be available from a > mainstream repository: if any mentioned in ‘Suggests’ or ‘Enhances’ fields > are not from such a repository, where to obtain them at a repository should > be specified in an

Re: [Rd] readLines interaction with gsub different in R-dev

2018-02-17 Thread Hugh Parsonage
ot; # latin1 encoding A call to `readLines` (possibly `scan()` and `read.table` and friends) is essential. On 18 February 2018 at 02:15, Dirk Eddelbuettel <e...@debian.org> wrote: > > On 17 February 2018 at 21:10, Hugh Parsonage wrote: > | I was told to re-raise this issue with

[Rd] readLines interaction with gsub different in R-dev

2018-02-17 Thread Hugh Parsonage
ot; to end case > conversion. However, the following code runs differently: tempf <- tempfile() writeLines(enc2utf8("author: Amélie"), con = tempf, useBytes = TRUE) entry <- readLines(tempf, encoding = "UTF-8") gsub("(\\w)", "\\U\\1", entry, perl = TRUE

Re: [R-pkg-devel] Strange Additional_repositories NOTE followed by package install error

2018-02-05 Thread Hugh Parsonage
NOTE Maintainer: 'Hugh Parsonage <hugh.parson...@gmail.com>' Possibly mis-spelled words in DESCRIPTION: Grattan (18:24) indices (17:77) repos (19:34) taxstats (19:23) Suggests or Enhances not in mainstream repositories: taxstats Availability using Additional_repositories specification:

[R-pkg-devel] Strange Additional_repositories NOTE followed by package install error

2018-02-05 Thread Hugh Parsonage
with _R_CHECK_CRAN_INCOMING_ = true I get the expected NOTE: * checking CRAN incoming feasibility ... NOTE Maintainer: ‘Hugh Parsonage <hugh.parson...@gmail.com>’ Suggests or Enhances not in mainstream repositories: taxstats Availability using Additional_repositories specification: taxstats

Re: [Rd] Why R should never move to git

2018-01-24 Thread Hugh Parsonage
I think the problem you're experiencing is not uncommon but has a solution. FWIW, I prefer git, but I think the best version control system for R is whatever R-core prefers. If they were 2% more productive working in an MS Word documents with Track Changes than git, so much worse for git. On 25

[R-pkg-devel] Is it ever appropriate (or mandatory) to Suggests: R (>= version) ?

2018-01-24 Thread Hugh Parsonage
I believe it is a requirement that if package A imports package B, and package B lists package C in Depends: then package A must also list package C in Depends: A popular stackoverflow answer states this.[1] I can't find any other source but it makes sense. What if package B is suggested by

Re: [R-pkg-devel] R-package did not pass the incoming checks automatically

2018-01-20 Thread Hugh Parsonage
Use the url at the bottom of the linked page, i.e. https://cran.r-project.org/package=ewoc On Sun, 21 Jan 2018 at 5:06 am, Roy Mendelssohn - NOAA Federal < roy.mendelss...@noaa.gov> wrote: > Hi Márcio: > > I do not have solutions to your specific problems, but the errors do > appear to be coming

[R-pkg-devel] rcnst issue

2018-01-12 Thread Hugh Parsonage
;). Do I need to stop using %fin% inside packages to avoid this error, or is the cause of the error elsewhere? I have some doubt that %fin% is totally to blame as the package through which %fin% is eventually called does not encounter the same error. Many t

[R-pkg-devel] CRAN policy on binary submission

2018-01-08 Thread Hugh Parsonage
On https://cran.r-project.org/ , it says > Note that we generally do not accept submissions of precompiled binaries due > to security reasons I note it says 'generally', not 'always'. Are there any packages on CRAN which were submitted as precompiled binaries? Under what circumstances would

Re: [R-pkg-devel] Assignments to the Global environment

2018-01-07 Thread Hugh Parsonage
I'm not CRAN, but something like this might be permissible while satisfying your requirements. z <- function(..., assign.env = parent.frame(1)) assign(as.character(s), temp3, envir = assign.env) The problem with assigning to the global environment is that z might be called where it is

[R-pkg-devel] Imports: vs Suggests:

2018-01-06 Thread Hugh Parsonage
package (like stats) or a recommended package (like KernSmooth)? Hugh Parsonage Grattan Institute __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel

[Rd] R CMD build errors if files cannot be moved, even if they are in Rbuildignore

2017-09-21 Thread Hugh Parsonage
eously when failing to copy files which will never be built. This may or may not make the unlink(allfiles[exclude], recursive = TRUE, force = TRUE) line redundant; I'm not sure. Hugh Parsonage Grattan Institute. [[alternative HTML version d

[Rd] \U or \L perl regex in gsub removes text outside capturing group in UTF-8 contexts

2017-06-19 Thread Hugh Parsonage
1252 LC_NUMERIC=C [5] LC_TIME=English_Australia.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.5.0 Many thanks, Hugh Parsonage Associate, Grattan Institute, Melbourne, AU [[alte