search for: createaltrep

Displaying 4 results from an estimated 4 matches for "createaltrep".

2019 May 16
3
ALTREP: Bug reports
...ects in ALTREP If the duplicate function is defined to return the object itself: SEXP vector_dulplicate(SEXP x, Rboolean deep) { return(x); } In R an ALTREP object will behave like an environment (pass-by-reference). However, if we do something like(pseudo code): n=100 > x=runif(n) > alt1=createAltrep(x) > alt2=alt1 > alt2[1]=10 > .Internal(inspect(alt1)) > .Internal(inspect(alt2)) The result would be: > .Internal(inspect(alt1)) > @0x00000000156f4d18 14 REALSXP g0c0 [NAM(7)] > > .Internal(inspect(alt2 )) > @0x00000000156a33e0 14 REALSXP g0c0 [NAM(7)] wrapper > [...
2019 May 16
3
ALTREP: Bug reports
...passed to > DUPLICATE has been duplciated and is safe to modify inplace. > > > >> In R an ALTREP object will behave like an environment (pass-by-reference). >> However, if we do something like(pseudo code): >> >> n=100 >> > x=runif(n) >> > alt1=createAltrep(x) >> > alt2=alt1 >> > alt2[1]=10 >> > .Internal(inspect(alt1)) >> > .Internal(inspect(alt2)) >> >> >> The result would be: >> >> > .Internal(inspect(alt1)) >> > @0x00000000156f4d18 14 REALSXP g0c0 [NAM(7)] >> >...
2019 May 16
0
ALTREP: Bug reports
...ely on the fact that a SEXP that has been passed to DUPLICATE has been duplciated and is safe to modify inplace. > In R an ALTREP object will behave like an environment (pass-by-reference). > However, if we do something like(pseudo code): > > n=100 > > x=runif(n) > > alt1=createAltrep(x) > > alt2=alt1 > > alt2[1]=10 > > .Internal(inspect(alt1)) > > .Internal(inspect(alt2)) > > > The result would be: > > > .Internal(inspect(alt1)) > > @0x00000000156f4d18 14 REALSXP g0c0 [NAM(7)] > > > .Internal(inspect(alt2 )) > > @0x...
2019 May 16
0
ALTREP: Bug reports
...is safe to modify inplace. >> >> >> >>> In R an ALTREP object will behave like an environment >>> (pass-by-reference). >>> However, if we do something like(pseudo code): >>> >>> n=100 >>> > x=runif(n) >>> > alt1=createAltrep(x) >>> > alt2=alt1 >>> > alt2[1]=10 >>> > .Internal(inspect(alt1)) >>> > .Internal(inspect(alt2)) >>> >>> >>> The result would be: >>> >>> > .Internal(inspect(alt1)) >>> > @0x00000000156f4d18...