similar to: BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"

Displaying 20 results from an estimated 30000 matches similar to: "BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer""

2019 Nov 18
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
On 11/18/19 9:18 AM, Martin Maechler wrote: >>>>>> Henrik Bengtsson >>>>>> on Sun, 17 Nov 2019 14:31:07 -0800 writes: > > $ R --vanilla R version 3.6.1 (2019-07-05) -- "Action of > > the Toes" Copyright (C) 2019 The R Foundation for > > Statistical Computing Platform: x86_64-pc-linux-gnu > > (64-bit) ...
2019 Nov 18
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
On 11/18/19 10:45 AM, Martin Maechler wrote: >>>>>> Tomas Kalibera >>>>>> on Mon, 18 Nov 2019 09:36:14 +0100 writes: > > On 11/18/19 9:18 AM, Martin Maechler wrote: > >>>>>>> Henrik Bengtsson > >>>>>>> on Sun, 17 Nov 2019 14:31:07 -0800 writes: > >> > $ R --vanilla R
2019 Nov 26
0
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
For what it's worth, the current behavior seems to have begun starting with version 3.6.0. If I run in version 3.5.3: > p1 <- .Primitive('+') ; p2 <- p1 ; attr(p1, "myattr") <- 1 ; p2 function (e1, e2)? .Primitive("+") > On 11/18/19 10:45 AM, Martin Maechler wrote: > >>>>>>/Tomas Kalibera />>>>>>/on Mon, 18
2019 Nov 18
0
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
>>>>> Tomas Kalibera >>>>> on Mon, 18 Nov 2019 09:36:14 +0100 writes: > On 11/18/19 9:18 AM, Martin Maechler wrote: >>>>>>> Henrik Bengtsson >>>>>>> on Sun, 17 Nov 2019 14:31:07 -0800 writes: >> > $ R --vanilla R version 3.6.1 (2019-07-05) -- "Action of >> > the Toes"
2018 Oct 07
4
Warning when calling formals() for `[`.
Hello, I don't see why you say that the documentation seems to be wrong: class(args(`+`)) #[1] "function" args() on a primitive does return a closure. At least in this case it does. Rui Barradas ?s 14:05 de 07/10/2018, Peter Dalgaard escreveu: > There is more "fun" afoot here, but I don't recall what the point may be: > >> args(get("+"))
2007 Mar 23
1
substitute and S4 objects
Hi all, I don't understand why this does not what I expect : ## code start here ############## setClass("num",representation(x="numeric")) num<-function(x) new("num",x=x) add<-function(e1,e2) { cat("Computing ",deparse(substitute(e1)),"+",deparse(substitute(e2)),"\n") e1@x+e2@x }
2008 Mar 13
2
Making custom unary operators in R
Hello, Is there a way to define a custom unary operator in R (other than making a class and 'overloading' the normal unary operators in R)? The documentation seems to suggest that only custom binary operators are possible with the ``%abc%``construct but I was wondering whether any one has done so. None of the RSiteSearch or RSeek queries I posed suggested that this question had
2009 Mar 15
4
primitives again
Dear R Gurus: How do I find the functions which are primitives, please? Thanks, Edna Bell
2010 Oct 28
1
overloading the generic primitive functions "+" and "["
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101028/d7e0cc89/attachment.pl>
2011 Nov 02
1
overloading + operator for chars
Hello,   I would like to overload the "+" operator so that it can be used to concatenate two strings, e.g "John" + "Doe" = "JohnDoe". How can I 'unseal' the "+" method? > setMethod("+", signature(e1="character", e2="character"), function(e1, e2) paste(e1, e2, sep="") ) Error in
2010 Sep 16
2
problem reading Matlab file into R
Hi, I'm trying to read a .mat file into R (2.11.1) with medium success so far. The file I have is a MATLAB 5.0 MAT-file exported from RiverSurveyor LIVE software (http://www.sontek.com/software.php). I have R.matlab and Rcompression installed and readMat() starts reading the file, as can be seen in verbose mode (hence medium success), but then gives the following error: Error in dim(matrix)
2017 Apr 19
2
Crash after (wrongly) applying product operator on S4 object that derives from list
Dear Hilmar Perhaps this gives an indication of why the infinite recursion happens: ## after calling `*` on ma and a matrix: > showMethods(classes=class(ma), includeDefs=TRUE, inherited = TRUE) Function: * (package base) e1="FOOCLASS", e2="matrix" (inherited from: e1="vector", e2="structure") (definition from function "Ops")
2018 Oct 07
1
Warning when calling formals() for `[`.
Hello, This is because args(`[`) returns NULL and class(NULL) is NULL. So the question would be why is the return value of args(`[`) NULL? Rui Barradas ?s 15:14 de 07/10/2018, Peter Dalgaard escreveu: > > >> On 7 Oct 2018, at 16:04 , Rui Barradas <ruipbarradas at sapo.pt> wrote: >> >> Hello, >> >> I don't see why you say that the documentation
2004 Jul 06
1
questions about setMethod("Arith", ...)
Hi, we have some questions concerning the definition of new arithmetic methods. In our package "distr" (on CRAN) we define some new arithmetic methods for "+", "-", "*", "/". After loading "distr" the corresponding arithmetic methods work. Now, if we define a new class and also a new method for one of the arithmetic methods
2005 Jun 29
1
Failed "make check" under Fedora Core 4 (PR#7979)
I downloaded R v2.1.1 earlier this morning to compile under Fedora Core 4. It compiled without incident, but 'make check' failed. Below is the relevant part of its report. Is this a known problem? I used a locally compiled version of GCC v4.0.0 that reports [kent at d89h102 R-2.1.1]$ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.0/configure
2011 Feb 05
1
Seeking help to define method for '+'
Dear all, I am trying to define "+" method for my newly defined s4 class which is as follows: setClass("Me", sealed=F,representation(x1 = "numeric", x2 = "character")) new1 <- new("Me", x1=2, x2="comment1") new2 <- new("Me", x1=3, x2="comment1") setMethod("+", "Me",
2007 Jul 12
2
is.null doesn't work
Hi, What's wrong here?: > v=c(`-`,`+`,1,`^`,`^`,NA,NA,"X",9,"X",2) > i2=16 > v[i2] [[1]] NULL > is.null(v[i2]) [1] FALSE Is it a bug or have I misunderstood something? Atte Tenkanen University of Turku, Finland
2018 Oct 06
5
Warning when calling formals() for `[`.
Hi, A short code example showing the warning might the only thing needed here: ``` > formals(args(`[`)) NULL *Warning message:In formals(fun) : argument is not a function* > is.function(`[`) [1] TRUE > is.primitive(`[`) [1] TRUE ``` Now with an other primitive: ``` > formals(args(`sum`)) $... $na.rm [1] FALSE > is.function(`sum`) [1] TRUE > is.primitive(`sum`) [1] TRUE
2010 Dec 07
4
increase or decrease variable by 1
many languages have shorthands for that operation like: variable += 1 or ++variable is there something like that in R ? -- View this message in context: http://r.789695.n4.nabble.com/increase-or-decrease-variable-by-1-tp3076390p3076390.html Sent from the R help mailing list archive at Nabble.com.
2006 Nov 14
3
Error in str(its-object)
Dear all, on my Windows XP R 2.4.0 version with Package its version 1.1.4 I have a problem with str() applied on an its-object after a simple matrix manipulation on the its object (see below). I am not sure, whether this a problem with my application, its or str(). Of course, one can make > str(core(its(mat)) / 1) num [1:2, 1:3] 1 2 3 4 5 6 - attr(*, "dimnames")=List of 2 ..$