Displaying 20 results from an estimated 2000 matches similar to: "Documenting else's greed"
2019 Aug 16
1
Documenting else's greed
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 first I thought it the question was simply one of syntax
precedence, but I believe the result is too
2020 Sep 10
0
more Matrix weirdness
>>>>> Georgi Boshnakov
>>>>> on Wed, 9 Sep 2020 10:48:56 +0000 writes:
> I think that this is because `[<-` dispatches on S4
> methods only if the first argument is S4. ?"[<-" says:
> "These operators are also implicit S4 generics, but as
> primitives, S4 methods will be dispatched only on S4
> objects
2020 Sep 09
3
more Matrix weirdness
I think that this is because `[<-` dispatches on S4 methods only if the first argument is S4.
?"[<-" says:
"These operators are also implicit S4 generics, but as primitives,
S4 methods will be dispatched only on S4 objects ?x?."
Georgi Boshnakov
-----Original Message-----
Message: 19
Date: Tue, 8 Sep 2020 22:04:44 -0400
From: Ben Bolker <bbolker at
2001 Nov 14
0
access greed?
Above all, think this through: Why is spam so annoying?
Because you like the ease and convenience of e-mail, that's why.
So your in box matters to you. Over the last decade it has become
hugely easier and quicker for you to contact others on a much bigger
scale than photocopied letters or even fax machines ever let us dream of.
And you resent the fact that hundreds of thousands of
2018 Feb 17
0
readLines interaction with gsub different in R-dev
I think the problem in R-devel happens when there are non-ASCII characters
in any
of the strings passed to gsub.
txt <- vapply(list(as.raw(c(0x41, 0x6d, 0xc3, 0xa9, 0x6c, 0x69, 0x65)),
as.raw(c(0x41, 0x6d, 0x65, 0x6c, 0x69, 0x61))), rawToChar, "")
txt
#[1] "Am?lie" "Amelia"
Encoding(txt)
#[1] "unknown" "unknown"
gsub(perl=TRUE,
2020 Sep 09
0
[External] Re: Operations with long altrep vectors cause segfaults on Windows
R Under development (unstable) (2020-09-08 r79165)
On Wed, 9 Sep 2020 at 18:00, Tomas Kalibera <tomas.kalibera at gmail.com> 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
> > [New Thread 19940.0x638c]
> > [New Thread 19940.0x102c]
> > [New
2018 Mar 05
1
Unclosed parenthesis in grep.Rd
There are probably more unmatched parentheses around:
detect <- function(file) {
text <- paste(readLines(file), collapse = "")
nchar(gsub("[^(]", "", text)) != nchar(gsub("[^)]", "", text))
}
docs <- list.files("r-source-trunk/src/library",
pattern = "\\.Rd$",
full.names =
2025 Jan 21
1
Creating a long list triggers billions of messages
? Tue, 21 Jan 2025 16:51:34 +1100
Hugh Parsonage <hugh.parsonage at gmail.com> ?????:
> x <- vector("list", 2^31)
>
> which triggers (presumably) billions of error messages like
> Error: long vectors are not supported yet ../include/Rinlinedfuns.h
I couldn't reproduce this with some released versions of R or a recent
R-devel. Would you mind sharing your
2020 Sep 09
2
[External] Re: Operations with long altrep vectors cause segfaults on Windows
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
> [New Thread 19940.0x638c]
> [New Thread 19940.0x102c]
> [New Thread 19940.0x329c]
> [New Thread 19940.0x37dc]
> warning: Invalid parameter passed to C runtime function.
>
> Program received signal SIGSEGV, Segmentation fault.
>
2020 Jul 19
3
Speed-up/Cache loadNamespace()
Thanks for the quick responses. As you both suggested storing the packages
to local drive is feasible but comes with a size restriction I wanted to
avoid. I'll keep this in mind as plan B.
@Hugh: 2. would impose even greater slowdowns and 4. is just not feasible.
However, 3. sounds interesting - how would this work in a Linux environment?
Thank you,
Mario
Am So., 19. Juli 2020 um 20:11 Uhr
2025 Jan 21
1
Creating a long list triggers billions of messages
I tried doing this on a cloud instance of R 4.4.2 but the terminal
exited and the cloud ejected my session shortly after setting the
breakpoint and running the program
Function "Rf_errorcall" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (Rf_errorcall) pending.
(gdb) run
Starting program: /opt/R/4.4.2/lib/R/bin/exec/R -q -s -e
2020 Feb 24
1
specials issue, a heads up
In the long run, coming up with a way to parse specials in formulas
that is both clean and robust is a good idea - annoying users are a
little bit like CRAN maintainers in this respect. I think I would
probably do this by testing identical(eval(extracted_head),
survival::Surv) - but this has lots of potential annoyances (what if
extracted_head is a symbol that can't be found in any attached
2020 Jul 19
0
Speed-up/Cache loadNamespace()
On 19 July 2020 at 20:47, Mario Annau wrote:
| Am So., 19. Juli 2020 um 20:11 Uhr schrieb Hugh Parsonage <
| hugh.parsonage at gmail.com>:
| > 3. Keep an R session running in perpetuity and source the scripts within
| > that everlasting session
| However, 3. sounds interesting - how would this work in a Linux environment?
You had Rserve by Simon for close to 20 years. There isn't
2020 Nov 17
0
[External] exists, get and get0 accept silently inputs of length > 1
Hi all,
I have used variable values in get() as well, and including, I think, in
package code (though pretty infrequently).
Perhaps a character.only argument similar to library?
~G
On Mon, Nov 16, 2020 at 5:31 PM Hugh Parsonage <hugh.parsonage at gmail.com>
wrote:
> I noticed the recent commit to R-dev (r79434). Is this wise? I've
> often used get() in constructions like
>
2020 Sep 08
2
[External] Re: Operations with long altrep vectors cause segfaults on Windows
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]
> [Thread 21752.0x3f10 exited with code 3221225477]
> [Inferior 1 (process 21752) exited with code 030000000005]
>
> (I'm guessing I would need to build an instrumented version of R, or
> can R
2020 Sep 09
0
[External] Re: Operations with long altrep vectors cause segfaults on Windows
Thank you!
I get
Starting program: C:\R\R-devel-20200909\bin\x64\Rgui.exe
[New Thread 19940.0x638c]
[New Thread 19940.0x102c]
[New Thread 19940.0x329c]
[New Thread 19940.0x37dc]
warning: Invalid parameter passed to C runtime function.
Program received signal SIGSEGV, Segmentation fault.
0x000000006c72d206 in compact_intseq_Dataptr (x=0x12783350,
writeable=<optimized out>) at
2020 Sep 09
2
[External] Re: Operations with long altrep vectors cause segfaults on Windows
On 9/9/20 8:48 AM, Hugh Parsonage wrote:
> I am unable to set break or use gdb with any success when I use that version.
>
> On linux I would do R -d gdb but this gives "unknown option '-d' "
> while gdb R.exe (in the same directory as the debug version) gives the
> same output as before.
>
> I'm happy to help but I appreciate this list might not be the
2020 Nov 17
1
[External] exists, get and get0 accept silently inputs of length > 1
Come on, folks. There is no NSE involved in calls to get(): it's
standard evaluation all the way into the C code. Prior to the change a
first argument that is anything other than a character vector would
produce an error. After the change, passing in a symbol will do the
obvious thing. Code that worked previously without error (i.e. called
get() with string values) will continue to work
2018 May 08
1
Proposed speedup of ifelse
Hugh,
(Note I speak for myself only and not for R-core) Thanks for looking into
this. I think it's great to have community members that are interested in
contributing to R and helping it continue to get better.
And I think, and my local experiments bear out, that using anyNA as a
fastpass condition does allow us to get a significant speedup over what's
in there now. To do so, though, I
2020 Sep 08
0
[External] Re: Operations with long altrep vectors cause segfaults on Windows
Unfortunately I only get
[Thread 21752.0x4aa8 exited with code 3221225477]
[Thread 21752.0x4514 exited with code 3221225477]
[Thread 21752.0x3f10 exited with code 3221225477]
[Inferior 1 (process 21752) exited with code 030000000005]
(I'm guessing I would need to build an instrumented version of R, or
can R be debugged using gdb with an off-the-shelf installation?)
On Wed, 9 Sep 2020 at