Re: [Rd] [External] Re: 1954 from NA

2021-06-03 Thread Greg Warnes
I would be glad to add this to one of my R packages, probably `gdata`.. -G Gregory R. Warnes, Ph.D. g...@warnes.net Eternity is a long time, take a friend! > On May 26, 2021, at 1:09 PM, Adrian Dușa wrote: > > Yes, that is even better. > Best, > Adrian > > On Wed, May 26, 2021 at 7:05 PM Dun

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Adrian Dușa
Yes, that is even better. Best, Adrian On Wed, May 26, 2021 at 7:05 PM Duncan Murdoch wrote: > After 5 minutes more thought: > > - code non-missing as missingKind = NA, not 0, so that missingKind could > be a character vector, or missingKind = 0 could be supported. > > - print methods should ret

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Adrian Dușa
On Wed, May 26, 2021 at 6:43 PM Duncan Murdoch wrote: > [...] > > In the best case scenario, it unnecessarily triples the size of the > > data, but perhaps this is the only way forward. > > I don't see how it could triple the size. Surely an integer has enough > values to cover all possible kind

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Duncan Murdoch
After 5 minutes more thought: - code non-missing as missingKind = NA, not 0, so that missingKind could be a character vector, or missingKind = 0 could be supported. - print methods should return the main argument, so mine should be print.MultiMissing <- function(x, ...) { vals <- as.charact

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Duncan Murdoch
On 26/05/2021 10:22 a.m., Adrian Dușa wrote: Dear Duncan, On Wed, May 26, 2021 at 2:27 AM Duncan Murdoch > wrote: You've already been told how to solve this:  just add attributes to the objects. Use the standard NA to indicate that there is some kind of

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Adrian Dușa
On Wed, May 26, 2021 at 4:13 AM Gregory Warnes wrote: > As a side note, for floating point values, the IEEE 754 standard provides > for a large set of NaN values, making it possible to have multiple types of > NAs for floating point values... > That is interesting, but how does one use different

Re: [Rd] [External] Re: 1954 from NA

2021-05-26 Thread Adrian Dușa
Dear Duncan, On Wed, May 26, 2021 at 2:27 AM Duncan Murdoch wrote: > You've already been told how to solve this: just add attributes to the > objects. Use the standard NA to indicate that there is some kind of > missingness, and the attribute to describe exactly what it is. Stick a > class on

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Avi Gross via R-devel
converting a copy to a factor, that may mess things up. If it has already been done and people have experience, great. If not, good luck. -Original Message- From: Gregory Warnes Sent: Tuesday, May 25, 2021 9:13 PM To: Avi Gross Cc: r-devel Subject: Re: [Rd] [External] Re: 1954 from NA

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Gregory Warnes
so on. > > So is there any reason only an NA should have such meta-data? Why not have > reasons associated with Inf stating it was an Inf because you asked for one > or the result of a calculation such as dividing by Zero (albeit maybe that > might be a NaN) and so on. Maybe I could annota

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Duncan Murdoch
You've already been told how to solve this: just add attributes to the objects. Use the standard NA to indicate that there is some kind of missingness, and the attribute to describe exactly what it is. Stick a class on those objects and define methods so that subsetting and arithmetic preserv

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Adrian Dușa
Dear Avi, That was quite a lengthy email... What you write makes sense of course. I try hard not to deviate from the base R, and thought my solution does just that but apparently no such luck. I suspect, however, that something will have to eventually change: since one of the R building blocks (s

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Avi Gross via R-devel
approaches may tempt them to try something and maybe later do more and more and move over. From: Adrian Dușa Sent: Tuesday, May 25, 2021 2:17 AM To: Avi Gross Cc: r-devel Subject: Re: [Rd] [External] Re: 1954 from NA Dear Avi, Thank you so much for the extended messages, I read them

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Adrian Dușa
On Tue, May 25, 2021 at 4:14 PM wrote: > [...] > > Yes, it should be discarded. > > You can of course do what you like in code you keep to yourself. But > please do not distribute code that does this. via CRAN or any other > means. It will only create problems for those maintaining R. > > > After

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread luke-tierney
, 2021 9:15 AM To: Adrian Dușa Cc: Greg Minshall ; r-devel Subject: Re: [Rd] [External] Re: 1954 from NA On Mon, 24 May 2021, Adrian Dușa wrote: On Mon, May 24, 2021 at 2:11 PM Greg Minshall wrote: [...] if you have 500 columns of possibly-NA'd variables, you could have one column of 500

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Adrian Dușa
ar > time. But after a while, how many cached results can there be? > > -----Original Message- > From: R-devel On Behalf Of > luke-tier...@uiowa.edu > Sent: Monday, May 24, 2021 9:15 AM > To: Adrian Dușa > Cc: Greg Minshall ; r-devel > Subject: Re: [Rd] [External] R

Re: [Rd] [External] Re: 1954 from NA

2021-05-24 Thread Avi Gross via R-devel
-devel On Behalf Of luke-tier...@uiowa.edu Sent: Monday, May 24, 2021 9:15 AM To: Adrian Dușa Cc: Greg Minshall ; r-devel Subject: Re: [Rd] [External] Re: 1954 from NA On Mon, 24 May 2021, Adrian Dușa wrote: > On Mon, May 24, 2021 at 2:11 PM Greg Minshall wrote: > >> [...] >&g

Re: [Rd] [External] Re: 1954 from NA

2021-05-24 Thread Greg Minshall
luke, > PLEASE DO NOT DO THIS! very happy to withdraw my offered alternative! cheers, Greg __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [External] Re: 1954 from NA

2021-05-24 Thread luke-tierney
On Mon, 24 May 2021, Adrian Dușa wrote: On Mon, May 24, 2021 at 2:11 PM Greg Minshall wrote: [...] if you have 500 columns of possibly-NA'd variables, you could have one column of 500 "bits", where each bit has one of N values, N being the number of explanations the corresponding column has f