Re: [R] puzzling behaviour of identical function

2015-05-30 Thread William Dunlap
Their 'srcref' attributes differ. srcref describes the text that the parser was given when creating the function. > identical(f1 <- function(x)1, f2 <- function(x)1) [1] FALSE > str(f1) function (x) - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 17 1 28 17 28 1 1 .. ..- attr(*, "srcfile")=

Re: [R] puzzling behaviour of identical function

2015-05-30 Thread Duncan Murdoch
On 30/05/2015 10:35 AM, Munawar Cheema wrote: > I am puzzled by the following seemingly contradictory calls to the function > identical. Below is a minimal example, that reproduces them: > >> sessionInfo() > R version 3.2.0 (2015-04-16) > Platform: x86_64-apple-darwin13.4.0 (64-bit) > Running unde

[R] puzzling behaviour of identical function

2015-05-30 Thread Munawar Cheema
I am puzzled by the following seemingly contradictory calls to the function identical. Below is a minimal example, that reproduces them: > sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.9.5 (Mavericks) locale: [1] C attached base pa