For what it's worth, I don't think this strategy can work in general,
because a class might have attributes that depend on its data/contents
(e.g. https://vctrs.r-lib.org/articles/s3-vector.html#cached-sum). I
don't think these are particularly common in practice, but it's
dangerous to assume that
Hi All,
I have some questions regarding the R C API.
Let's assume I have a function which is defined as follows:
R file:
myfunc <- function(a, b, ...) .External(Cfun, a, b, ...)
C file:
SEXP Cfun(SEXP args) {
args = CDR(args);
SEXP a = CAR(args); args = CDR(args);
SEXP b = CAR(args); ar
On 5/11/19 3:41 AM, Hadley Wickham wrote:
For what it's worth, I don't think this strategy can work in general,
because a class might have attributes that depend on its data/contents
(e.g. https://vctrs.r-lib.org/articles/s3-vector.html#cached-sum). I
don't think these are particularly common
Hi Rolf,
On 11/4/19 12:28, Rolf Turner wrote:
>
> On 5/11/19 3:41 AM, Hadley Wickham wrote:
>
>> For what it's worth, I don't think this strategy can work in general,
>> because a class might have attributes that depend on its data/contents
>> (e.g.
>> https://urldefense.proofpoint.com/v2/url?u
> the perils certainly are not immediately apparent to me.
Here is a concrete example of a peril
`[.myclass` <- function(x, i, j, drop = if (missing(i)) TRUE else
length(cols) == 1)
{
SaveAt <- lapply(x, attributes)
x <- NextMethod()
lX <- lapply(names(x),function(nm, x, S
On 04/11/2019 4:40 p.m., Pages, Herve wrote:
Hi Rolf,
On 11/4/19 12:28, Rolf Turner wrote:
On 5/11/19 3:41 AM, Hadley Wickham wrote:
For what it's worth, I don't think this strategy can work in general,
because a class might have attributes that depend on its data/contents
(e.g.
https://urld
On 5/11/19 10:54 AM, Duncan Murdoch wrote:
On 04/11/2019 4:40 p.m., Pages, Herve wrote:
Hi Rolf,
On 11/4/19 12:28, Rolf Turner wrote:
On 5/11/19 3:41 AM, Hadley Wickham wrote:
For what it's worth, I don't think this strategy can work in general,
because a class might have attributes that de
On 11/4/19 13:54, Duncan Murdoch wrote:
> On 04/11/2019 4:40 p.m., Pages, Herve wrote:
>> Hi Rolf,
>>
>> On 11/4/19 12:28, Rolf Turner wrote:
>>>
>>> On 5/11/19 3:41 AM, Hadley Wickham wrote:
>>>
For what it's worth, I don't think this strategy can work in general,
because a class might
Hi Morgan,
My solutions might not be the best one(I believe it's not), but it should
work for your question.
1. Have you considered Rf_duplicate function? If you want to change the
value of `a` and reset it later, you have to have a duplication somewhere
for resetting it. Instead of changing the
Thank you for your reply Jiefei.
I think in theory your solution should work. I'll have to give them a try.
On Mon, 4 Nov 2019 23:41 Wang Jiefei, wrote:
> Hi Morgan,
>
> My solutions might not be the best one(I believe it's not), but it should
> work for your question.
>
> 1. Have you considere
10 matches
Mail list logo