Re: [Rd] Coping with non-standard evaluation in R program analysis

2018-01-18 Thread Gabriel Becker
> > >> > >> https://cran.r-project.org/doc/manuals/r-release/R-lang. > html#Promise-objects > >> > >> > >> Thank you, > >> > >> > >> Evan > >> > >> > >> [[alternative HTML version delete

Re: [Rd] as.list method for by Objects

2018-01-30 Thread Gabriel Becker
efense.proofpoint.com/v2/url?u=https-3A__stat.et >> hz.ch_mailman_listinfo_r-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84V >> tBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=8nXbM >> rKus1XsG7MluCRy3sluJKKhMVwOPHtudDpYJ4o&s=qDnEZOWalov3E9h1daj >

Re: [Rd] Best practices in developing package: From a single file

2018-01-31 Thread Gabriel Becker
________ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > * > > Confidentiality Note: The information contained in this ...{{dropped:10}} > > > > __ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Gabriel Becker, PhD Scientist (Bioinformatics) Genentech Research [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Best practices in developing package: From a single file

2018-02-01 Thread Gabriel Becker
On Thu, Feb 1, 2018 at 5:24 AM, Lionel Henry wrote: > On 31 janv. 2018, at 09:08, Gabriel Becker wrote: > > > it *actively discourages* the bits it doesn't directly support. > > It may be discouraging to include Rd syntax in roxygen docs but only > because the

Re: [Rd] Duplicate column names created by base::merge() when by.x has the same name as a column in y

2018-02-18 Thread Gabriel Becker
licated "name" column: > >>>>>> merge(parents, children, by.x = "name", by.y = "parent") > >>>>>> ``` > >>>>>> > >>>>>> Output: > >>>>>> ``` > >>>>>&

Re: [Rd] Duplicate column names created by base::merge() when by.x has the same name as a column in y

2018-02-21 Thread Gabriel Becker
mes only the first can be > > > indexed by its name. This will always be the column appearing in by.x, > > > meaning the column in y with the same name cannot be accessed. Appending > > > ".y" (suffixes[2L]) to this column means it can now be accessed, while > > &g

Re: [Rd] STRING_IS_SORTED claims as.character(1:100) is sorted

2018-11-20 Thread Gabriel Becker
Thank you for the report. We will look at this and make sure it gets fixed. ~G On Thu, Nov 15, 2018, 3:13 PM Michael Sannella via R-devel < r-devel@r-project.org> wrote: > If I have loaded the C code: > SEXP altrep_STRING_IS_SORTED(SEXP x) > { > return ScalarInteger(STRING_IS_SO

Re: [Rd] unsorted - suggestion for performance improvement and ALTREP support for POSIXct

2019-01-07 Thread Gabriel Becker
Hi Harvey, Its exciting to see people thinking about and looking at ALTREP speedups "in the wild" :). You're absolutely right that pulling out the REAL call will give you a significant speedup, but ALTREP does add a little wrinkle (and a solution to it!). Detailed responses and comments inline:

Re: [Rd] Objectsize function visiting every element for alt-rep strings

2019-01-18 Thread Gabriel Becker
Travers, Great to hear you're trying out the ALTREP stuff, good on you :). Did you mean the get_altstring_Elt_method? I see the code in size.c within utils that grabs each element, but I don't see any setting (and the setters are noops currently anyway they just do things the old way). One thing

Re: [Rd] pmax and long vector

2019-01-21 Thread Gabriel Becker
Kasper, If you're not interested or dont have time to create said patch yourself let me know and i can do it. Best, ~G On Mon, Jan 21, 2019, 11:36 AM Duncan Murdoch On 21/01/2019 12:35 p.m., Kasper Daniel Hansen wrote: > > I see that base::pmax() does not support long vectors. > > > > Is R-deve

Re: [Rd] bias issue in sample() (PR 17494)

2019-02-19 Thread Gabriel Becker
Luke, I'm happy to help with this. Its great to see this get tackled (I've cc'ed Kelli Ottoboni who helped flag this issue). I can prepare a patch for the RNGkind related stuff and the doc update. As for ???, what are your (and others') thoughts about the possibility of a) a reproducibility API

Re: [Rd] code for sum function

2019-02-21 Thread Gabriel Becker
Hi all, >From what I can see from my checkout of the Rsources (in src/main/summary.c as pointed out by others) sums are calculated the "naive" way (see rsum c function) but means are actually calculated something akin to the Neumaier way (see real_mean c function). Just an fyi. ~G On Thu, Feb

[Rd] Bugzilla down?

2019-02-25 Thread Gabriel Becker
Hi Martin (who I believe manages bz?) et al., I'm getting 503 Service Unavailable from bugzilla currently ( https://bugs.r-project.org/bugzilla/ and direct links to specific bugs, both). Is this a known issue? Thanks, ~G [[alternative HTML version deleted]] _

Re: [Rd] Bugzilla down?

2019-02-25 Thread Gabriel Becker
> wrote: > > > > I do. The server ran out of disk earlier today and it seems that it > killed bugzilla somehow. I'll have a look. > > Thanks, > > Simon > > > > > >> On Feb 25, 2019, at 2:07 PM, Gabriel Becker > wrote: > >> > &g

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

2019-02-26 Thread Gabriel Becker
As I recall, the major blocker is that R links against a number of other things (notably BLAS, pcre, etc) so while technically possible (?) I suppose, the universe of things you'd have to compile over and then get working is much larger than just the R internals. I think most people who consider t

Re: [Rd] Intermittent crashes with inset `[<-` command

2019-02-27 Thread Gabriel Becker
Hi Brian, I don't have a windows machine, but on a modern macbook pro I'm not able to get this to crash in 3.5.1 or a very recent built-from-source R-devel. I increased the length of x by 2 orders of magnitude but that just made the loop take a lot longer to successfully run in both R versions i

Re: [Rd] Should CRAN accept packages with non-R code that transcompiles into R code?

2019-03-04 Thread Gabriel Becker
Abs (?), I have thought about and have (somewhere "up near the top" of my todo list) prototyping a preprocessor for R, and I have relevant code that emits (transpiles, in a way) structured comments into S4 code in https://github.com/gmbecker/S4Coffee. All that said, until/unless the preprocessor

Re: [Rd] Should CRAN accept packages with non-R code that transcompiles into R code?

2019-03-05 Thread Gabriel Becker
On Tue, Mar 5, 2019 at 12:41 PM Abs Spurdle wrote: > > > On Tue, Mar 5, 2019 at 12:52 PM Gabriel Becker > wrote: > >> I have thought about and have (somewhere "up near the top" of my todo >> list) prototyping a preprocessor for R, and I have relevant cod

Re: [Rd] as.Date(Inf) displays as 'NA' but is actually 'Inf'

2019-03-05 Thread Gabriel Becker
Richard, Well others may chime in here, but from a mathematical point of view, the concept of "infinite days from right now" is well-defined, so it maybe a "valid" date in that sense, but what day and month it will be (year will be Inf) are indeterminate/not well defined. Those are rightfully, NA,

Re: [Rd] as.Date(Inf) displays as 'NA' but is actually 'Inf'

2019-03-05 Thread Gabriel Becker
chnically, but also conceptually. For the record, I'd be surprised by that too, but I think its a situation of pieces working correctly individually, but together having a correct but unintuitive behavior. Others may feel differently though, thats just my read on it. Best, ~G > > a &

Re: [Rd] bugs in head() and tail()

2019-03-25 Thread Gabriel Becker
Hi Abs, This is because the class is "f", not c("f", "function") in your second example. S3 method dispatch is doing what you (unintentionally, I presume) asked it to do. The S3 method which allows head to take functions is utils:::head.function. S3 can only be expected to understand inheritance

Re: [Rd] Discrepancy between is.list() and is(x, "list")

2019-03-26 Thread Gabriel Becker
Hi Abs, Lets try to remain civil even when disagreeing about major design philosophies, ok? On Tue, Mar 26, 2019 at 2:08 PM Abs Spurdle wrote: > If I can merge this thread with the one I started yesterday... > > > "If the object does not have a class attribute, it has an implicit > class..." >

Re: [Rd] Discrepancy between is.list() and is(x, "list")

2019-03-26 Thread Gabriel Becker
Abs et al, Ok, so I have just gone and re-read the docs again. My language was a more absolute than it should have been; *however*, I was still correct for the cases under discussion. >From ?UseMethod (emphasis mine) An R object is a data object which has a ‘class’ attribute (and this can

Re: [Rd] [RFC] readtable enhancement

2019-03-27 Thread Gabriel Becker
Kurt, Cool idea and great "seeing new faces" on here proposing things on here and engaging with R-core on here. Some comments on the issue of fallbacks below. On Wed, Mar 27, 2019 at 10:33 PM Kurt Van Dijck < dev.k...@vandijck-laurijssen.be> wrote: > Hey, > > In the meantime, I submitted a bug

Re: [Rd] Discrepancy between is.list() and is(x, "list")

2019-03-28 Thread Gabriel Becker
Abs, Inline. On Thu, Mar 28, 2019 at 8:10 PM Abs Spurdle wrote: > I know I said that I had no further comments on object oriented semantics. > However, I found a contradiction in the R documentation. > > > Gabriel Becker wrote: > > So, there are implicit classes, but *only

Re: [Rd] Use of C++ in Packages

2019-03-29 Thread Gabriel Becker
Hi Jim (et al.), Comments inline (and assume any offense was unintended, these kinds of things can be tricky to talk about). On Fri, Mar 29, 2019 at 8:19 AM Jim Hester wrote: > First, thank you to Tomas for writing his recent post[0] on the R > developer blog. It raised important issues in inte

Re: [Rd] ALTREP: Design concept of alternative string

2019-05-09 Thread Gabriel Becker
Hi Jiefei, The issue here is that while the memory consequences of what you're describing may be true, this is simply how R handles character vector (what you're calling string) values internally. It doesn't actually have anything to do with ALTREP. Standard character vector SEXPs have an array of

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread Gabriel Becker
Hi Jiefei, Thanks for tryingout the ALTREP stuff and letting us know how it is going. That said I don't think either of these are bugs, per se, but rather a misunderstanding of the API. Details inline. On Thu, May 16, 2019 at 11:57 AM 介非王 wrote: > Hello, > > I have encountered two bugs when u

[Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-16 Thread Gabriel Becker
Hi all, Apologies if this has been asked before (a quick google didn't find it for me),and I know this is a case of behaving as documented but its so unintuitive (to me at least) that I figured I'd bring it up here anyway. I figure its probably going to not be changed, but I'm happy to submit a

Re: [Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-16 Thread Gabriel Becker
Hi Hadley, Thanks for the counterpoint. Response below. On Thu, May 16, 2019 at 1:59 PM Hadley Wickham wrote: > The existing behaviour seems inutitive to me. I would consider these > invariants for n vector x_i's each with size m: > > * nrow(rbind(x_1, x_2, ..., x_n)) equals n > Personally, no

Re: [Rd] ALTREP: Bug reports

2019-05-16 Thread Gabriel Becker
double >> > sm1=peekSharedMemory(so1) >> getting data 1 >> > sm2=peekSharedMemory(so2) >> getting data 1 >> getting data 1 > > > We see that so2 call R_altrep_data1 twice to get the internal data. This > is very unexpected. > > Thank you very much

Re: [Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-16 Thread Gabriel Becker
On Thu, May 16, 2019 at 3:47 PM Gabriel Becker wrote: > Hi Hadley, > > Thanks for the counterpoint. Response below. > > On Thu, May 16, 2019 at 1:59 PM Hadley Wickham > wrote: > >> The existing behaviour seems inutitive to me. I would consider these >> invari

Re: [Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-16 Thread Gabriel Becker
ws because they don't contain data) would be equally valid, and to N>1 people, at least equally intuitive. Best, ~G > > hmmm... not sure why ncol(cbind(aa=character(0), AA=character(0))) or > nrow(rbind(aa=character(0), AA=character(0))) should do anything > different from w

Re: [Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-17 Thread Gabriel Becker
Hi Martin, Thanks for chiming in. Responses inline. On Fri, May 17, 2019 at 12:32 AM Martin Maechler wrote: > >>>>> Gabriel Becker > >>>>> on Thu, 16 May 2019 15:47:57 -0700 writes: > > > Hi Hadley, > > Thanks for the counterpoint

Re: [Rd] Converting non-32-bit integers from python to R to use bit64: reticulate

2019-05-29 Thread Gabriel Becker
Hi Juan, Comments inline. On Wed, May 29, 2019 at 12:48 PM Juan Telleria Ruiz de Aguirre < jtelleria.rproj...@gmail.com> wrote: > Dear R Developers, > > There is an interesting issue related to "reticulate" R package which > discusses how to convert Python's non-32 bit integers to R, which has h

Re: [Rd] [External] undefined symbol errors when compiling package using ALTREP API

2019-06-04 Thread Gabriel Becker
Hi Mark, So depending pretty strongly on what you mean by "ALTREP aware", packages aren't necessarily supposed to be ALTREP aware. What I mean by this is that as of right now, ALTREP objects are designed to be interacted with by non-ALTREP-implementing package code, *more-or-less *exactly as stand

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-11 Thread Gabriel Becker
Hi Frank, I'm hesitant to be "that guy", but in case no one else has brought this up to you, having files with a tilde in their names (generally but especially on a linux system, where ~ in file names has a very important special meaning in some cases, as we know) strikes me as an exceptionally ba

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-12 Thread Gabriel Becker
t on Linux to change the > > names, > > >> but if you are not comfortable with bash try the Windows approach. > > >> > > >> Bill Dunlap > > >> TIBCO Software > > >> wdunlap tibco.com > > >> > > >> > > &

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-13 Thread Gabriel Becker
At the risk of looking silly, note that all of this is now largely moot anyway (or will be with the next release of R), thanks to Kurt Hornik's fixing of the bug in question (which he announced on this thread prior to but I read after Paul's). ~G On Wed, Jun 12, 2019 at 11:51 PM Gabr

Re: [Rd] Calculation of e^{z^2/2} for a normal deviate z

2019-06-21 Thread Gabriel Becker
Hi Jing, Peter pointed out how you can, more or less, get numbers for this, and he's absolutely right. At the risk of giving unsolicited advice, though, Im don't think you *should* in this case. Someone on this list with more applied Statistics or Statistical Genetics experience can correct me if

Re: [Rd] strange increase in the reference number

2019-07-12 Thread Gabriel Becker
Hi Jiefei and Duncan, I suspect what is likely happening is that one of ENSURE_NAMEDMAX or MARK_NOT_MUTABLE are being hit for x. These used to set named to 3, but now set it to 7 (ie the previous and current NAMEDMAX value, respectively). Because these are macros rather than C functions, its no

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-07-12 Thread Gabriel Becker
Hi Michael and Abby, So one thing that could happen that would be backwards compatible (with the exception of something that was an error no longer being an error) is head and tail could take vectors of length (dim(x)) rather than integers of length for n, with the default being n=6 being equivale

Re: [Rd] Convert STRSXP or INTSXP to factor

2019-07-15 Thread Gabriel Becker
Hi Morgan, So if the goal is output identical to calling factor, one thing youc an do is construct and evaluate a call to the R-level factor function. That would work and be guaranteed to meet your requirement. The factor function is implemented with R code, without even any direct calls d

Re: [Rd] ALTREP wrappers and factors

2019-07-18 Thread Gabriel Becker
Hi Jiefei and Kylie, Great to see people engaging with the ALTREP framework and identifying places we may need more tooling. Comments inline. On Thu, Jul 18, 2019 at 12:22 PM King Jiefei wrote: > > If that is the case and you are 100% sure the reference number should be 1 > for your variable *y

Re: [Rd] Any plans for ALTREP lists (VECSXP)?

2019-07-23 Thread Gabriel Becker
Hi Kylie, Is it a list with only numerics in it? (I only see REALSXPs there, but obviously inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential b

Re: [Rd] [External] Re: Any plans for ALTREP lists (VECSXP)?

2019-07-24 Thread Gabriel Becker
thods a class should provide: > >Extract_subset >not Dataptr >not Dataptr_or_null > > 'altlist' specific methods: > >Elt >Set_elt > > Best, > > luke > > On Tue, 23 Jul 2019, Gabriel Becker wrote: > > > Hi Kylie, > > &g

Re: [Rd] [External] Re: Any plans for ALTREP lists (VECSXP)?

2019-07-24 Thread Gabriel Becker
@Kylie happy to collaborate on it if you're interested. ~G On Wed, Jul 24, 2019 at 10:43 AM Gabriel Becker wrote: > I can work on this. Thanks Luke. > > ~G > > On Wed, Jul 24, 2019 at 8:25 AM Tierney, Luke > wrote: > >> If one of you wanted to try to

Re: [Rd] Underscores in package names

2019-08-09 Thread Gabriel Becker
Hi Jim, While its true that it wouldn't be *particularly *hard^^ to adapt the base code to change this, there is certainly a non-zero amount of user/package code that relies on the well-defined package tarball naming scheme as well. I know because I've written some myself in switchr/GRAN* but I se

Re: [Rd] Underscores in package names

2019-08-09 Thread Gabriel Becker
On Fri, Aug 9, 2019 at 11:05 AM neonira Arinoem wrote: > Won't it be better to have a convention that allows lowercase, dash, > underscore and dot as only valid characters for new package names and keep > the ancient format validation scheme for older package names? > Validation isn't the only t

Re: [Rd] Underscores in package names

2019-08-09 Thread Gabriel Becker
~G > That's why I consider the weird case name you presented as irrelevant, and > not to be considered. > > > Le ven. 9 août 2019 à 20:41, Gabriel Becker a > écrit : > >> >> >> On Fri, Aug 9, 2019 at 11:05 AM neonira Arinoem >> wrote: >> >

Re: [Rd] Underscores in package names

2019-08-09 Thread Gabriel Becker
Duncan, On Fri, Aug 9, 2019 at 1:17 PM Duncan Murdoch wrote: > On 09/08/2019 2:41 p.m., Gabriel Becker wrote: > > Note that this proposal would make mypackage_2.3.1 a valid *package > name*, > > whose corresponding tarball name might be mypackage_2.3.1_2.3.2 after a > >

Re: [Rd] What is the best way to loop over an ALTREP vector?

2019-08-28 Thread Gabriel Becker
Jiefei, I've been meaning to write up something about this so hopefully this will be an impetus for me to actually do that, but until then, responses inline. On Tue, Aug 27, 2019, 7:22 PM Wang Jiefei wrote: > Hi devel team, > > I'm working on C/C++ level ALTREP compatibility for a package. The

Re: [Rd] [ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?

2019-09-11 Thread Gabriel Becker
Hi Jiefei, The meanings of the return values for sortedness can be found in RInternals.h, and are as follows: /* ALTREP sorting support */ enum {SORTED_DECR_NA_1ST = -2, SORTED_DECR = -1, UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INC

Re: [Rd] What is the best way to loop over an ALTREP vector?

2019-09-23 Thread Gabriel Becker
; > >> ITERATE_BY_REGION(sx, ptr, ind, nbatch, int, LOGICAL, expr);\ > >> > >> break; \ > >> > >> default:\ > >> > >> Rf_error("Unknow data type\n"); \ > >> > >> break; \ > >> &

Re: [Rd] should base R have a piping operator ?

2019-10-05 Thread Gabriel Becker
Hi all, I think there's some nuance here that makes makes me agree partially with each "side". The pipe is inarguably extremely popular. Many probably think of it as a core feature of R, along with the tidyverse that (as was pointed out) largely surrounds it and drives its popularity. Whether its

Re: [Rd] Strange "no-echo" in place of "slave"

2019-10-06 Thread Gabriel Becker
As far as I know, not being involved with the effort at all, they are removing the term 'slave' and replacing it with 'no-echo' which is intended to be fully synonmyous with the meaning of the old 'slave' term. ~G On Sun, Oct 6, 2019 at 10:56 PM suharto_anggono--- via R-devel < r-devel@r-project.

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-10-18 Thread Gabriel Becker
orkshopped version, > would you like > >>>> to proceed? Feel free to ping me to review the patch once it's > posted. > >>>> > >>>> On Mon, Sep 16, 2019 at 3:26 PM Martin Maechler < > maech...@stat.math.ethz.ch> >

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-10-29 Thread Gabriel Becker
Hi all, So I've started working on this and I ran into something that I didn't know, namely that for x a multi-dimensional (2+) array, head(x) and tail(x) ignore dimension completely, treat x as an atomic vector, and return an (unclassed) atomic vector: > x = array(100, c(4, 5, 5)) > dim(x) [1]

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-10-31 Thread Gabriel Becker
Hi Martin, On Wed, Oct 30, 2019 at 4:30 AM Martin Maechler wrote: > >>>>> Gabriel Becker > >>>>> on Tue, 29 Oct 2019 12:43:15 -0700 writes: > > > Hi all, > > So I've started working on this and I ran into something that I >

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-11-02 Thread Gabriel Becker
Thanks Martin and Peter, I agree that we can be careful and narrow and still see a nice improvement in behavior. While Herve's point is valid and I understand his frustration, I think staying within the matrix vs c(matrix, array) space is the right scope for this work in terms of fiddling with in

Re: [Rd] head.matrix can return 1000s of columns -- limit to n or add new argument?

2019-11-02 Thread Gabriel Becker
tural extension of that would be hitting tail.array for any 2+d table, I think. ~G On Sat, Nov 2, 2019 at 12:37 PM Gabriel Becker wrote: > Thanks Martin and Peter, > > I agree that we can be careful and narrow and still see a nice improvement > in behavior. While Herve's point is vali

Re: [Rd] Questions on the R C API

2019-11-05 Thread Gabriel Becker
Hi Martin and Jiefei, A quick note, I'll try to respond more completely later. > It is a primitive but I don't understand how it manage to do that. > Primitives and Internals are allowed to be, but usually aren't, SPECIALSXPs rather than BUILTINSXPs. SPECIALSXPs receive their arguments unevalua

Re: [Rd] improving the performance of install.packages

2019-11-08 Thread Gabriel Becker
Hi Josh, There are a few issues I can think of with this. The primary one is that CRAN(/Bioconductor) is not the only place one can install packages from. I might have version x.y.z of a package installed that was, at the time, a development version I got from github, or installed locally, etc. He

Re: [Rd] calls with comment attribute

2019-11-12 Thread Gabriel Becker
Bill, Without being involved in that code at all, it seems that this could be used to (re)create commented source code from R objects. That format seems to correspond directly to a call in a .R file with two comments above it. A bit weird there's no comment character there but I guess thats expect

Re: [Rd] head/tail breaking change

2019-12-18 Thread Gabriel Becker
Jan, That is an intentional change as you can see in the documentation for head/tail in R-devel. Last time I discussed it with Martin, this behavior was desired and thus is unlikely to change unless "our" (ie his) mind does. The hope is that the new behavior is actually what people would want (no

Re: [Rd] ALTREP string methods for substr and nchar

2019-12-19 Thread Gabriel Becker
Hi Jim, Thanks for posting this. Honestly the methods list I initially proposed years ago and the one Luke eventually put in which had some of what I had said and a bunch of new stuff, was pretty heavily focused on numeric values (exclusively so, in my case, I think). I agree that there is a lot

[Rd] list.files(., pattern=<>, recursive = TRUE, include.dirs = TRUE)

2019-12-20 Thread Gabriel Becker
Hi all, I ran into a weird corner-case of list.files today and I'm wondering what people think about it and a potential wishlist enhancement related to it. Consider the case where we call list.files with recursive and include.dirs both TRUE and we supply a pattern. In this case pattern is applie

Re: [Rd] re-submission of package after CRAN-pretest notes

2020-01-08 Thread Gabriel Becker
Hi Michael, At the risk of sounding like I'm just name-dropping, R. Gentleman once told me something along the lines of "version numbers are cheap, don't be afrai to use a lot of them". I get that its a bit annoying but its for good reason, imho. Any change, no matter how trivial will change the

Re: [Rd] dput()

2020-02-29 Thread Gabriel Becker
Hi Robin, In the future, questions like this belong on R-help, not R-devel as it is a basic usage question not a discussion about development of the R language itself or similar. That said, ?dput states a number of times that exact deparsing is not always possible and that dput is not appropriate

Re: [Rd] survival bug?

2020-03-03 Thread Gabriel Becker
Hi Terry, http://win-builder.r-project.org/ and the rhub build service (which can be invoked by the rhub package) allow on demand checks in windows environments, though for active debugging the iteration time can be quite painful. If you have access, e.g., through your employer, to a windows lice

Re: [Rd] is.vector could handle AsIs class better

2020-03-29 Thread Gabriel Becker
Jan, I believe it's because it has "a non-NULL attribute other than names" as per the documentation. In this case its class of "AsIs". Best, ~G On Sun, Mar 29, 2020 at 6:29 AM Jan Gorecki wrote: > Dear R-devel, > > AsIs class seems to be well handled by `typeof` and `mode` function. > Those tw

Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?

2020-03-29 Thread Gabriel Becker
I do my devel/patch work on Mac so I can take a shot at testing your branch in the next couple days. ~G On Sun, Mar 29, 2020 at 7:24 PM Paul Murrell wrote: > Hi > > I have created an R branch that contains a potential fix ... > > https://svn.r-project.org/R/branches/R-symfam/ > > This allows, f

[Rd] Any help needed in prep of 4.0.0?

2020-03-31 Thread Gabriel Becker
Hi all, Are there any small patches or further testing that any R-core members would like help with in the preparation to 4.0.0? Sadly @Martin Maechler I don't have the numerical optimization chops to be any help with qbeta, sorry. But if there's anything else, small private wishlist items or t

Re: [Rd] Rtools and R 4.0.0?

2020-04-06 Thread Gabriel Becker
Hi Kevin, On Wed, Apr 1, 2020 at 9:36 PM Kevin Ushey wrote: > Hello, > > FWIW, I'm excited at the prospect at seeing a new toolchain for > Windows, since it would imply support for C++17 and so it would become > easier for CRAN packages to depend on the newer C++ standard. > One thing to keep i

Re: [Rd] Rtools and R 4.0.0?

2020-04-06 Thread Gabriel Becker
this quickly, which Kevin brought up. R itself obviously won't be relying on c++17 since there is no c++ code in it at all I believe. Best, ~G On Mon, Apr 6, 2020 at 5:38 AM Jeroen Ooms wrote: > On Mon, Apr 6, 2020 at 9:39 AM Gabriel Becker > wrote: > > > > Hi Kevin, >

Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?

2020-04-07 Thread Gabriel Becker
Paul et al, I will try to do this tonight or tomorrow, though it will not be built with th system tools because I have yet to get that tto work locally (spent a good chunk of this morning trying). I will send a separate messaage regarding those difficulties as well so that we can at least confirm

Re: [Rd] detect ->

2020-04-13 Thread Gabriel Becker
Adrian, Indeed, this has come up in a few places, but as Gabor says, there is no such thing as right hand assignment at any point after parsing is complete. This means the only feasible way to detect it, which a few projects do I believe, is process the code while it is still raw text, before it

Re: [Rd] Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path

2020-04-14 Thread Gabriel Becker
If we are fiddling with normalizePath, having a way of not following symlinks (otheer than ~) would be useful as well. I had to write normalizePath2 in switchr for a specific on-the-ground need to NOT go down all he way to physical paths on a remote compute system because of how IT handled imple

Re: [Rd] Rtools and R 4.0.0?

2020-04-28 Thread Gabriel Becker
Huge thanks to you (Jeroen) and R-core for doing this. I wasn't involved with this directly but I know it was a pretty seriously heavy list so well done all around! ~G On Tue, Apr 28, 2020, 11:04 AM Hervé Pagès wrote: > Thanks Jeroen! > > > On Tue, Apr 7, 2020 at 6:07 PM Kevin Ushey wrote:

Re: [Rd] docs about _R_CHECK_FORCE_SUGGESTS_ ?

2020-05-13 Thread Gabriel Becker
Hi Toby, As Gabor pointed out the place where the various levers R CMD check supports is in the R-internals manual, but there is a link directly to that section in https://cloud.r-project.org/doc/manuals/r-release/R-exts.html#Checking-packages It could perhaps be more prominent, perhaps by moving

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-15 Thread Gabriel Becker
Hi all, This makes sense to me, but I would think that recycle0 and collapse should actually be incompatible and paste should throw an error if recycle0 were TRUE and collapse were declared in the same call. I don't think the value of recycle0 should be silently ignored if it is actively specified

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Gabriel Becker
n controlled by 'sep'). Which makes plenty of sense: the 1st > > operation is binary (or n-ary) while the collapse operation is > unary. > > There is no concept of recycling in the context of unary operations. > > Interesting, ..., and sounding somewhat convinc

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Gabriel Becker
operation. >> >> The 'recycle0' argument has no business in the 'collapse' operation >> (which comes after the 'sep' operation): this operation still behaves >> like it always had. >> >> That's all there is to it. >> >

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-23 Thread Gabriel Becker
, collapse = ", ", recycle0=TRUE) if length(y) is 0, it literally makes no difference when x and z are. I seem to be being largely outvoted anyway though, so we will see what Martin and others who may pop up might think, but I raised the points I wanted to raise so we'll see wher

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-23 Thread Gabriel Becker
many times! > > > > Now with 'collapse0=TRUE', we finally have the opportunity to make it do > > the right thing. Let's not miss that opportunity. > > > > Cheers, > > H. > > FWIW what convinces me is consistency with other aggregating functions

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-24 Thread Gabriel Becker
On Sat, May 23, 2020 at 9:59 PM Hervé Pagès wrote: > On 5/23/20 17:45, Gabriel Becker wrote: > > Maybe my intuition is just > > different but when I collapse multiple character vectors together, I > > expect all the characters from each of those vectors to be in the > &

Re: [Rd] Scripting SVG with R

2010-10-15 Thread Gabriel Becker
Wolfgang, I am currently working on this very thing under Duncan Temple Lang. Or, to be more precise what you are describing is one piece of our overarching goal, which is to create a system in which R can be run from within a browser (currently FireFox) with bi-directional communication occurring

[Rd] Activating a Regular Binding

2011-04-06 Thread Gabriel Becker
f8LC_COLLATE=en_US.utf8 [5] LC_MONETARY=C LC_MESSAGES=en_US.utf8 [7] LC_PAPER=en_US.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datas

Re: [Rd] Performance of .C and .Call functions vs. native R code

2011-07-14 Thread Gabriel Becker
LOGICAL(rowmajor); >int n = length(x); >int m = length(A) / n; >SEXP y; >PROTECT(y = allocVector(REALSXP, m)); >ry = REAL(y); >for (int i = 0; i < m; i++) { >ry[i] = 0.0; >for (int j =

Re: [Rd] Best practices for writing R functions

2011-07-22 Thread Gabriel Becker
ttp://r.789695.n4.nabble.com/Best-practices-for-writing-R-functions-tp3686674p3686674.html> >> Sent from the R devel mailing list archive at Nabble.com. >> >> __** >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/m

[Rd] Out-of-date manual or small bug in R CMD check?

2011-08-29 Thread Gabriel Becker
FICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] gridSVG_0.5-10 ProteinVis_0.4 latticeExtra_0.6-18 [4] RColorBrewer_1.0-2 lattice_0.19-33 -- Gabriel Becker Graduate Student Statistics Department Uni

Re: [Rd] Out-of-date manual or small bug in R CMD check?

2011-08-29 Thread Gabriel Becker
On Mon, Aug 29, 2011 at 5:30 PM, Duncan Murdoch wrote: > On 11-08-29 6:37 PM, Gabriel Becker wrote: > >> Hey all, >> >> I get a warning about an unsupported file type in the data directory >> during >> R CMD check (for R 2.13.1) if I use the save function to c

Re: [Rd] Is it possible to pass a function argument from R to compiled code in C?

2011-09-20 Thread Gabriel Becker
g mailing list >> https://stat.ethz.ch/mailman/**listinfo/r-devel<https://stat.ethz.ch/mailman/listinfo/r-devel> >> > > __** > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-devel<https:/

Re: [Rd] MetaCran website v1.0.0-alpha

2015-05-26 Thread Gabriel Becker
ithub or not. If it is, you may just fork the original > repo instead of creating a new one from the CRAN package. Maybe I'm missing something, but why would you fork the repo instead of just using the existing repo? -- Gabriel Becker, PhD Computational Biologist Bioinformatics and C

Re: [Rd] MetaCran website v1.0.0-alpha

2015-05-26 Thread Gabriel Becker
at the repositories actually be forked. ~G On Tue, May 26, 2015 at 10:26 AM, Hadley Wickham wrote: > On Tue, May 26, 2015 at 12:18 PM, Gabriel Becker > wrote: > > On Tue, May 26, 2015 at 9:25 AM, Yihui Xie wrote: > > > >> I cannot speak for other package authors

Re: [Rd] MetaCran website v1.0.0-alpha

2015-05-26 Thread Gabriel Becker
On Tue, May 26, 2015 at 10:55 AM, Gábor Csárdi wrote: > On Tue, May 26, 2015 at 1:46 PM, Gabriel Becker > wrote: > >> That's true, but issues, checkouts, comments, credit, etc should all be >> going to the original repo. > > > You mean the links? They are, ar

Re: [Rd] S4 inheritance and old class

2015-05-28 Thread Gabriel Becker
s( >>Class = "D", >>contains = "C", >>slots = list(D = "character"), >>validity = function(object){ >> cat("Testing an object of class '", class(object), >> "'' with valitity fu

Re: [Rd] NEWS.md support on CRAN

2015-06-02 Thread Gabriel Becker
R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Gabriel Becker, PhD Computational Biologist Bioinformatics and Computational Biology Genentech, Inc. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] NEWS.md support on CRAN

2015-06-04 Thread Gabriel Becker
t; | >>>> Markdown is allowed for vignettes (because the package author > > processes > > >> | >>>> those), so I'd suggest putting your news into a vignette > instead > > of a > > >> | >>>> news file. Put in a t

Re: [Rd] Add on argument in seq()

2015-06-15 Thread Gabriel Becker
Millot, I think the problem with that is that what you propose isn't a sequence starting at from in any meaningful way, and thus does not satisfy the contract of the seq function. Best, ~G On Jun 15, 2015 7:12 AM, "Millot Gael" wrote: > Hi. > > I have a problem with the default behavior of seq

  1   2   3   4   >