Displaying 20 results from an estimated 800 matches similar to: "ALTREP package interaction with testthat"
2019 Jul 18
0
ALTREP wrappers and factors
Hi Kylie,
For your question, I don't think a wrapper can completely solve your
problem. The duplication occurs since your variable y has more than 1
reference number( Please see highlighted), so even you have a wrapper, any
changes on the value of the wrapper still can trigger the duplication.
> .Internal(inspect(y))
> @7fb0ce78c0f0 13 INTSXP g0c0 *[NAM(7)]* matter vector (mode=3,
2019 Jul 17
2
ALTREP wrappers and factors
Hello,
I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function.
I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
Hi Mark,
So depending pretty strongly on what you mean by "ALTREP aware", packages
aren't necessarily supposed to be ALTREP aware. What I mean by this is that
as of right now, ALTREP objects are designed to be interacted with by
non-ALTREP-implementing package code, *more-or-less *exactly as standard
(non-AR) SEXPs are: via the published C API. The more or less comes from
the fact
2019 May 16
0
ALTREP: Bug reports
Hi Jiefei,
Thanks for tryingout the ALTREP stuff and letting us know how it is going.
That said I don't think either of these are bugs, per se, but rather a
misunderstanding of the API. Details inline.
On Thu, May 16, 2019 at 11:57 AM ??? <szwjf08 at gmail.com> wrote:
> Hello,
>
> I have encountered two bugs when using ALTREP APIs.
>
> 1. STDVEC_DATAPTR
>
> From
2020 Oct 07
0
Coercion function does not work for the ALTREP object
Jiefei,
Where does the code for your altrep class live?
Thanks,
~G
On Wed, Oct 7, 2020 at 4:25 AM Jiefei Wang <szwjf08 at gmail.com> wrote:
> Hi all,
>
> The coercion function defined for the ALTREP object will not be called by R
> when an assignment operation implicitly introduces coercion for a large
> ALTREP object.
>
> For example, If I create a vector of length
2017 Sep 17
2
R-devel r73293 and the testthat package
Hello,
Windows R-devel no longer lets me use testthat even though the CRAN checks are pretty much clean. I have copied my session output below.
Will
R Under development (unstable) (2017-09-16 r73293) -- "Unsuffered Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO
2019 Jun 05
0
[External] undefined symbol errors when compiling package using ALTREP API
For now you can use
R_altrep_inherits(x, R_compact_intseq_class)
The variable R_compact_intseq_class should currently be visible to
packages on all platforms, though that may change if we eventually
provide a string-based lookup mechanism, e.g. somehting like
R_find_altrep_class("compact_intseq", "base")
Best,
luke
On Tue, 4 Jun 2019, Mark Klik wrote:
> Hi Gabriel,
2019 Jul 23
0
Any plans for ALTREP lists (VECSXP)?
Hi Kylie,
As an alternative in the short term, you could consider deriving from
S4Vector's List class, implementing the getListElement() method to
lazily create the objects.
Michael
On Tue, Jul 23, 2019 at 9:09 AM Bemis, Kylie <k.bemis at northeastern.edu> wrote:
>
> Hello,
>
> I was wondering if there were any plans for ALTREP lists (VECSXP)?
>
> It seems to me that
2019 Jul 24
0
[External] Re: Any plans for ALTREP lists (VECSXP)?
If one of you wanted to try to create a patch to support ALTREP
generic vectors here are some notes:
The main challenge I am aware of (there might be others): Allowing
DATAPTR to return a writable pointer would be too dangerous because
the GC write barrier needs to see all mutations. So it would be best
if Dataptr and Dataptr_or_null methods were not allowed to be
defined. The default methods in
2024 Apr 22
1
Is ALTREP "non-API"?
Hello, I don't believe it is illegal, as ALTREP "implements an abstraction
underneath the C API". And is "compatible with all code which uses the API".
Please see slide deck by Gabriel Becker, with L Tierney, M Lawrence and T
Kalibera.
https://bioconductor.org/help/course-materials/2020/BiocDevelForum/16-ALTREP
.pdf
ALTREP framework implements an abstraction underneath
2020 Nov 21
0
[External] Two ALTREP questions
On Sat, 21 Nov 2020, Jiefei Wang wrote:
> Hello,
>
> I have two related ALTREP questions. It seems like there is no way to
> assign attributes to an ALTREP vector without using C++ code. To be more
> specifically, I want to make an ALTREP matrix, I have tried the following R
> code but none of them work.
> ```
> .Internal(inspect(1:6))
> .Internal(inspect(matrix(1:6,
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
On Tue, 4 Jun 2019, Mark Klik wrote:
> Hello,
>
> I'm developing a package (lazyvec) that makes full use of the ALTREP
> framework (R >= 3.6.0).
> One application of the package is to wrap existing ALTREP vectors in a new
> ALTREP vector and pass all calls from R to the contained object. The
> purpose of this is to provide a diagnostic framework for working with
>
2019 May 09
0
ALTREP: Design concept of alternative string
Hi Jiefei,
The issue here is that while the memory consequences of what you're
describing may be true, this is simply how R handles character vector (what
you're calling string) values internally. It doesn't actually have anything
to do with ALTREP. Standard character vector SEXPs have an array of CHARSXP
pointers in their payload (what is returned by DATAPTR) as well.
As far as I
2024 Apr 22
1
Is ALTREP "non-API"?
Thanks, Hernando,
Sorry, "API" is a bit confusing term in this context, but what I want to
discuss is the "API" that Writing R Extension defines as quoted in my
previous email. It's probably different from an ordinary sense when we
casually say "R C API".
You might wonder why I care about such a difference. This is because
calling a "non-API" is
2019 May 16
0
ALTREP: Bug reports
Jiefei,
Inline.
On Thu, May 16, 2019 at 2:30 PM ??? <szwjf08 at gmail.com> wrote:
> Hello Luke and Gabriel,
>
> Thank you very much for your quick responses. The explanation of STDVEC is
> very helpful and I appreciate it! For the wrapper, I have a few new
> questions.
>
>
> 1. Like Luke said a mutable object is not possible. However, I noticed
> that there is
2019 Sep 23
0
What is the best way to loop over an ALTREP vector?
Hi Gabriel,
I have tried the macro and found a small issue, it seems like the macro is
written in C and does an implicit type conversion(const void * to const int
*), see below. While it is allowed in C, C++ seems not happy with it. Is it
possible to add an explicit type casting so that it can be compatible with
both language?
#define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype,
2020 Oct 08
1
Coercion function does not work for the ALTREP object
Hi Gabriel, here is a simple package for reproducing the problem.
https://github.com/Jiefei-Wang/testPkg
Best,
Jiefei
On Thu, Oct 8, 2020 at 5:04 AM Gabriel Becker <gabembecker at gmail.com> wrote:
> Jiefei,
>
> Where does the code for your altrep class live?
>
> Thanks,
> ~G
>
> On Wed, Oct 7, 2020 at 4:25 AM Jiefei Wang <szwjf08 at gmail.com> wrote:
>
2020 Feb 03
1
ALTREP "wrapper" classes needs an Extract_subset method
Hi all,
I believe I have found a bug (or perhaps just an oversight) with the ALTREP
wrapper classes. The short form of this is that I believe that the wrapper
classes need to override the default ALTREP `Extract_subset_method()` with
a method that calls `Extract_subset()` on the "wrapped" object. I have a
patch prepared here:
https://github.com/DavisVaughan/r-source/pull/1
There is
2019 May 10
0
[External] Re: ALTREP: Design concept of alternative string
On Fri, 10 May 2019, ??? wrote:
> Hi Gabriel,
>
> Thanks for your explanation, I totally understand that it is almost
> impossible to change the data structure of STRSXP. However, what I'm
> proposing is not about changing the internal representation, but rather
> about how we design and use the ALTREP API.
>
> I might do not state the workarounds clearly as English is
2019 Sep 24
0
What is the best way to loop over an ALTREP vector?
Not sure if you're using just C++ or Rcpp for C++ access but https://purrple.cat/blog/2018/10/14/altrep-and-cpp/ has some tips on using C++ w/ALTREP.
> On Sep 23, 2019, at 3:17 PM, Wang Jiefei <szwjf08 at gmail.com> wrote:
>
> Sorry for post a lot of things, for the first part of code, I copied my C++
> iter macro by mistake(and you can see an explicit type casting). Here