Displaying 20 results from an estimated 1975 matches for "primitives".
Did you mean:
primitive
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("+"))
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, my favorite `help()` is `?.Internal()`: "Only
true R wizards should even consider using this function..." Thanks
again!
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
Dear,
I have noticed this problem while looking at the 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
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
>
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"
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
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
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:
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
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 reflect this.
But that doesn't make *any
2019 Nov 17
2
BUG?: A copy of base::`+` (primitive) is not a clone but a "pointer"
$ 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)
...
> str(base::`+`)
function (e1, e2)
> plus <- structure(base::`+`, class = "plus")
> str(plus)
function (e1, e2)
- attr(*, "class")= chr "plus"
## Hmm ...
>
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
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 strange. Maybe, the method is better called just getID, since it can
get id for both primitive and derived types....
2017 Mar 28
0
`[` not recognized as a primitive in certain cases.
Thank you gents, I overlooked the subtle differences.
On Tue, Mar 28, 2017 at 2:49 PM, Lukas Stadler <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
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
> returns reasonable value is quite strange. Maybe, the method is better
> called just getID, since it can get id for both p...
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,"Species"))
The `[` would
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"
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