[Rd] "utils::file.edit" does not understand "editor" with additional arguments

2018-08-28 Thread Randy Lai
I am using Sublime Text as my editor. If I run `subl -n .Rprofile` in bash, a file would be opened in a new window. Back in R, if I run this > file.edit(".Rprofile", editor="'subl -n'") sh: 'subl -n': command not found Warning message: error in running command However, the interesting bit happe

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

2018-08-28 Thread Henrik Bengtsson
# Issue 'x || y' performs 'x[1] || y' for length(x) > 1. For instance (here using R 3.5.1), > c(TRUE, TRUE) || FALSE [1] TRUE > c(TRUE, FALSE) || FALSE [1] TRUE > c(TRUE, NA) || FALSE [1] TRUE > c(FALSE, TRUE) || FALSE [1] FALSE This property is symmetric in LHS and RHS (i.e. 'y || x' behaves t

Re: [Rd] Is this a bug in `[`?

2018-08-28 Thread Henrik Bengtsson
FYI, this behavior is documented in Section 3.4.1 'Indexing by vectors' of 'R Language Definition' (accessible for instance via help.start()): "*Integer* [...] A special case is the zero index, which has null effects: x[0] is an empty vector and otherwise including zeros among positive or negative

Re: [Rd] Is this a bug in `[`?

2018-08-28 Thread Rui Barradas
Hello, Thanks for the pointer. Inline. On 29/08/2018 04:17, Henrik Bengtsson wrote: FYI, this behavior is documented in Section 3.4.1 'Indexing by vectors' of 'R Language Definition' (accessible for instance via help.start()): "*Integer* [...] A special case is the zero index, which has null e