search for: primit

Displaying 20 results from an estimated 1975 matches for "primit".

Did you mean: plimit
2009 Mar 15
4
primitives again
Dear R Gurus: How do I find the functions which are primitives, please? Thanks, Edna Bell
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("+")) > function (e1, e2) > NULL >> ar...
2020 Jul 10
2
lapply and vapply Primitive Documentation
The documentation of ?lapply includes: > lapply and vapply are primitive functions. However, both evaluate to FALSE in `is.primitive()`: is.primitive(vapply) #FALSE is.primitive(lapply) #FALSE It appears that they are not primitives and that the documentation might be outdated. Thank you for your time and work. Cole Miller P.S. During research,...
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
...he following question on Stackoverflow : http://stackoverflow.com/questions/42894213/s4-class-subset-inheritance-with-additional-arguments While going through callNextMethod, I've noticed the following odd behaviour: mc <- call("[",iris,2,"Species") mc[[1]] ## `[` is.primitive(`[`) ## [1] TRUE is.primitive(mc[[1]]) ## [1] FALSE # Expected to be TRUE mc2 <- as.call(list(`[`,iris,2,"Species")) is.primitive(mc2[[1]]) ## [1] TRUE So depending on how I construct the call (using call() or as.call() ), the function `[` is or is not recognized as a primitive...
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
?typeof? is your friend here: > typeof(`[`) [1] "special" > typeof(mc[[1]]) [1] "symbol" > typeof(mc2[[1]]) [1] "special" so mc[[1]] is a symbol, and thus not a primitive. - Lukas > On 28 Mar 2017, at 14:46, Michael Lawrence <lawrence.michael at gene.com> wrote: > > There is a difference between the symbol and the function (primitive > or closure) to which it is bound. > > This: > mc2 <- as.call(list(`[`,iris,2,"Species&quot...
2013 Aug 17
1
[LLVMdev] [brlcad-devel] Clang vs. gcc for building BRL-CAD
On Sat, Aug 17, 2013 at 7:08 AM, Tom Browder <tom.browder at gmail.com> wrote: > On Sat, Aug 17, 2013 at 6:15 AM, Tom Browder <tom.browder at gmail.com>wrote: > >> On Fri, Aug 16, 2013 at 2:58 PM, Tom Browder <tom.browder at gmail.com>wrote: >> >>> On Fri, Aug 16, 2013 at 2:55 PM, Tom Browder <tom.browder at gmail.com>wrote: >>>
2019 Nov 18
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
...> > ## Hmm ... > >> str(plus) > > function (e1, e2) > > > Even without assigning to `plus`, you get this behavior: > > > $ R --vanilla > >> structure(base::`+`, class = "plus") > > function (e1, e2) .Primitive("+") attr(,"class") [1] > > "plus" > > > # Hmm... > >> str(base::`+`) > > function (e1, e2) - attr(*, "class")= chr "plus" > > > Looks to be the case for common (all?) .Primitive &gt...
2019 Nov 18
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
...; > function (e1, e2) > >> > >> > Even without assigning to `plus`, you get this behavior: > >> > >> > $ R --vanilla > >> >> structure(base::`+`, class = "plus") > >> > function (e1, e2) .Primitive("+") attr(,"class") [1] > >> > "plus" > >> > >> > # Hmm... > >> >> str(base::`+`) > >> > function (e1, e2) - attr(*, "class")= chr "plus" > >> >...
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 > class(`[`) [1] "function" ``` Is this a feature ? Laurent [[alternative HTML version deleted]]
2013 Aug 11
3
[LLVMdev] Are integer types primitive?
The LLVM docs seem to indicate that integer types are considered primitive, however looking at the code I see `FirstDerivedTyID = IntegerTyID`, implying that integers are derived rather than primitive. Should the docs be updated? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/2013...
2018 Oct 07
1
Warning when calling formals() for `[`.
...2018, at 16:04 , Rui Barradas <ruipbarradas at sapo.pt> wrote: >> >> 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. > > But in this case it doesn't: > >> is.primitive(get("[")) > [1] TRUE >> class(args(get("["))) > [1] "NULL" > > Or, for that matter: > >> is.primitive(`[`) >...
2013 Aug 12
0
[LLVMdev] Are integer types primitive?
Originally, the distinguishing feature of "primitive" types was that they were enumerable and not parameterized on anything. Then we moved to arbitrary bit-width integers types to generalize things significantly (the right move IMO). Thus, integers were no longer technically primitive types, and their categorization in code has changed to r...
2019 Nov 17
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
...ot;class")= chr "plus" > class(base::`+`) <- NULL > str(base::`+`) function (e1, e2) ## Hmm ... > str(plus) function (e1, e2) Even without assigning to `plus`, you get this behavior: $ R --vanilla > structure(base::`+`, class = "plus") function (e1, e2) .Primitive("+") attr(,"class") [1] "plus" # Hmm... > str(base::`+`) function (e1, e2) - attr(*, "class")= chr "plus" Looks to be the case for common (all?) .Primitive functions. Is this expected? Should I report this one to BugZilla? /Henrik
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 Nov 2019 09:36:14 +0100 writes: />/> On...
2004 Jun 17
3
[LLVMdev] Primitive types
Hello, I'm getting this in debugger, where 't' is 'Type*': (gdb) p t->isPrimitiveType() $15 = false (gdb) p t->getPrimitiveID() $16 = PointerTyID (gdb) p t->getPrimitiveSize() $17 = 0 There are a couple of things that I'd like to ask. First, if isPrimitiveType() returns false, that the fact that getPrimitiveID returns reasonable value is quite stra...
2017 Mar 28
0
`[` not recognized as a primitive in certain cases.
...adler <lukas.stadler at oracle.com> wrote: > ?typeof? is your friend here: > > > typeof(`[`) > [1] "special" > > typeof(mc[[1]]) > [1] "symbol" > > typeof(mc2[[1]]) > [1] "special" > > so mc[[1]] is a symbol, and thus not a primitive. > > - Lukas > > > On 28 Mar 2017, at 14:46, Michael Lawrence <lawrence.michael at gene.com> > wrote: > > > > There is a difference between the symbol and the function (primitive > > or closure) to which it is bound. > > > > This: > > m...
2004 Jun 17
0
[LLVMdev] Primitive types
On Thu, 17 Jun 2004, Vladimir Prus wrote: > I'm getting this in debugger, where 't' is 'Type*': > > (gdb) p t->isPrimitiveType() > $15 = false > (gdb) p t->getPrimitiveID() > $16 = PointerTyID > (gdb) p t->getPrimitiveSize() > $17 = 0 > > There are a couple of things that I'd like to ask. First, if > isPrimitiveType() returns false, that the fact that getPrimitiveID...
2017 Mar 28
0
`[` not recognized as a primitive in certain cases.
There is a difference between the symbol and the function (primitive or closure) to which it is bound. This: mc2 <- as.call(list(`[`,iris,2,"Species")) Evaluates `[` to its value, in this case the primitive object, and the primitive itself is incorporated into the returned call. If you were to do this: mc2 <- as.call(list(quote(`[`),iris,2,&quo...
2019 Nov 18
0
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
...gt; >> str(plus) >> > function (e1, e2) >> >> > Even without assigning to `plus`, you get this behavior: >> >> > $ R --vanilla >> >> structure(base::`+`, class = "plus") >> > function (e1, e2) .Primitive("+") attr(,"class") [1] >> > "plus" >> >> > # Hmm... >> >> str(base::`+`) >> > function (e1, e2) - attr(*, "class")= chr "plus" >> >> > Looks to be the case...
2010 May 24
1
Functioning and source code location of .Primitive()
Hi all. I began examining the R source code in the last few days, for a better understanding of its structure. I read the manuals and digged deeply (maybe not enough?) into the source code, but I couldn't totally understand how .Primitive() works. Its effects, if I understand well, are quite clear to me (calling the C compiled counterpart of a "primitive" function), but where is its definition? The only things I was able to find were: -in src/library/base/R/zzz.R, its creation in the .ArgsEnv environment, but with NULL...