Hi,
I've noticed something strange when using the terms {stats} function.
R documentation describes the factors attribute of the terms.object as follows:
A matrix of variables by terms showing which variables appear in which terms.
The entries are 0 if the variable does not occur in the term, 1
I ran into this and found the result very surprising:
identical( quote({ a }), quote({ a }) )
# FALSE
It seems related to curly braces. For example, parens work fine:
identical( quote(( a )), quote(( a )) )
# TRUE
Is this expected behavior? I can't seem to find anything in the help
for identic
On Wed, Oct 29, 2014 at 3:26 PM, Winston Chang wrote:
> I ran into this and found the result very surprising:
>
> identical( quote({ a }), quote({ a }) )
> # FALSE
>
> It seems related to curly braces. For example, parens work fine:
> identical( quote(( a )), quote(( a )) )
> # TRUE
>
> Is this
Fascinating! I tried the comparisons with all.equal(), expecting a
description of the difference, but TRUE was returned in both cases.
Dave
On Wed, Oct 29, 2014 at 3:26 PM, Winston Chang
wrote:
> I ran into this and found the result very surprising:
>
> identical( quote({ a }), quote({ a }) )
>> Is this expected behavior? I can't seem to find anything in the help
>> for identical that relates to this.
>>
> It's not in ?identical, but ?Paren gives you some pointers.
> str(quote((a))) and str(quote({a})) are also informative.
Yes, looks like srcrefs are to blame:
x <- quote({ a })
y <-
Ah, I was using identical() to compare two function bodies. It returns
FALSE even when you remove srcrefs from the body:
f1 <- function(x) {
if (TRUE) { x }
}
f2 <- function(x) {
if (TRUE) { x }
}
f1b <- body(f1)
f2b <- body(f2)
attributes(f1b) <- NULL
attributes(f2b) <- NULL
# The bodies loo
Another 1000 packages were added to CRAN and this time in less than 12
months. Today (2014-10-29) on The Comprehensive R Archive Network
(CRAN) [1]:
"Currently, the CRAN package repository features 6000 available packages."
Going from 5000 to 6000 packages took 355 days - which means that it's
o
[See below for full email trail-- Outlook has beaten me into submission]
> I ran into this and found the result very surprising:
> identical( quote({ a }), quote({ a }) ) # FALSE
> <<...>>
> -Winston
> > Yes, looks like srcrefs are to blame:
> >
> > x <- quote({ a })
> > y <- quote({ a })
> >
>
On 29/10/2014, 6:22 PM, mark.braving...@csiro.au wrote:
> [See below for full email trail-- Outlook has beaten me into submission]
>> I ran into this and found the result very surprising:
>
>> identical( quote({ a }), quote({ a }) ) # FALSE
>> <<...>>
>> -Winston
>
>>> Yes, looks like srcrefs ar
Greetings,
When I try "install.packages('Rcpp')" it fails when compiling api.cpp (line
39). This is Rcpp 0.11.3. I searched my filesystem, and indeed I do not have
execinfo.h anywhere. After some effort, I got R build on AIX. Now I am trying
to build the packages I need. Rcpp is crucial.
I fir
10 matches
Mail list logo