On 05/06/2014 01:44 PM, William Dunlap wrote:
Run the following function over the output of
parse("yourSourceCode.R") to edit the parse tree:
inToIsElement <- function (expr)
{
# expr should be an expression or a call, not a function.
# The output of parse(keep.source=FALSE) or quote()
Run the following function over the output of
parse("yourSourceCode.R") to edit the parse tree:
inToIsElement <- function (expr)
{
# expr should be an expression or a call, not a function.
# The output of parse(keep.source=FALSE) or quote() is good.
if (is.call(expr) && identical(expr[
On May 6, 2014, at 1:06 PM, Hervé Pagès wrote:
> On 05/06/2014 12:36 PM, William Dunlap wrote:
>> When does els%in%set give a different result than is.element(els,set)?
>> I assumed they were copied form S+, where they are the same except
>> for argument names, but I may be wrong.
>
> > els <-
On 05/06/2014 01:15 PM, William Dunlap wrote:
In your example els%in%set gave the same result as
is.element(els,set), but because of precedence issues putting a unary
minus in front caused them to be given different inputs - one got -els
and the other got just els for the first argument.
So you
In your example els%in%set gave the same result as
is.element(els,set), but because of precedence issues putting a unary
minus in front caused them to be given different inputs - one got -els
and the other got just els for the first argument. To change one to
the other you have to edit the parsed
On 05/06/2014 12:36 PM, William Dunlap wrote:
When does els%in%set give a different result than is.element(els,set)?
I assumed they were copied form S+, where they are the same except
for argument names, but I may be wrong.
> els <- 2:1
> set <- 1:6
> - els%in%set
[1] FALSE FALSE
>
When does els%in%set give a different result than is.element(els,set)?
I assumed they were copied form S+, where they are the same except
for argument names, but I may be wrong.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, May 6, 2014 at 12:23 PM, Hervé Pagès wrote:
> On 05/06/2014 08:5
On 05/06/2014 08:54 AM, William Dunlap wrote:
You can also use is.element(els,set) instead of the equivalent
els%in%set
No they are not *equivalent*. Equivalent means you could substitute
one by the other in your code without changing its behavior.
H.
and leave your precedence problems behin
Here is source code for help(Syntax) from S+, which I think follows
closely the original S help file:
.Ix precedence
The following \f6infix\fP operators are recognized by the parser.
They are listed in decreasing precedence.
In the event of ties, evaluation is from left to right.
.sp
.in +.5i
.nf
.
Dear list,
When installing the latest version of Rtools (3.1.0.1942) into a path that
contains more than 96 characters on Windows 7 64-bit,
e.g. into
C:\TheLatestRtoolsInAPathWithMoreThanNinetySixCharactersWillCrashTheRSessionUponCallingTheSysWhichFunctionInRToGetTheGccPath
and assuming that t
On 06/05/2014 1:01 PM, peter dalgaard wrote:
On 06 May 2014, at 18:20 , Hadley Wickham wrote:
>>> BTW, that %in% has precedence over arithmetic operations is surprising,
>>> error-prone, and doesn't cover any reasonable use case (who needs to
>>> multiply the logical vector returned by %in% by
On 06 May 2014, at 18:20 , Hadley Wickham wrote:
>>> BTW, that %in% has precedence over arithmetic operations is surprising,
>>> error-prone, and doesn't cover any reasonable use case (who needs to
>>> multiply the logical vector returned by %in% by some value?) but that's
>>> another story:
>>
>> BTW, that %in% has precedence over arithmetic operations is surprising,
>> error-prone, and doesn't cover any reasonable use case (who needs to
>> multiply the logical vector returned by %in% by some value?) but that's
>> another story:
>
> The point here is that the %foo% operators all have the
You can also use is.element(els,set) instead of the equivalent
els%in%set and leave your precedence problems behind.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, May 5, 2014 at 10:35 PM, peter dalgaard wrote:
>
> On 06 May 2014, at 01:05 , Hervé Pagès wrote:
>
>>
>> BTW, that %in% has p
14 matches
Mail list logo