search for: jiefei

Displaying 20 results from an estimated 81 matches for "jiefei".

2020 Oct 19
2
Is there any way to check the class of an ALTREP?
Benjamin, You happened to send a link which points to the OP's own package :) I think Jiefei would like to know how one can "officially" determine if an arbitrary ALTERP object belongs to a class that he owns. Regards, Denes On 10/19/20 10:22 AM, Benjamin Christoffersen wrote: > It seems as if you can you use the ALTREP macro as done in this > package: https://github.co...
2020 Oct 19
1
Is there any way to check the class of an ALTREP?
...dy been shared, so I need to check whether an object is an ALTREP that is defined in my package. Since the ALTREP definition involves an ` R_altrep_class_t` object and a class name, I will expect to see a method defined in R to retrieve such information. I hope this can clarify my question. Best, Jiefei On Mon, Oct 19, 2020 at 5:38 PM Benjamin Christoffersen <boennecd at gmail.com> wrote: > > You happened to send a link which points to the OP's own package :) I > > think Jiefei would like to know how one can "officially" determine if an > > arbitrary ALTERP...
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 Mar 10
4
R CMD INSTALL cannot recognize full path on Windows
Oops, I think both of us forget to cite the r-devel channel. Best, Jiefei On Tue, Mar 10, 2020 at 5:13 AM Wang Jiefei <szwjf08 at gmail.com> wrote: > Thanks for your quick response, Tomas. > > Yes, this is a path issue, I think the problem is related to R, not the > Rtools make. I built an example package for reproducing the problem: > https://gith...
2020 Mar 11
1
R CMD INSTALL cannot recognize full path on Windows
Jiefei, you did not commit all files into the example package - your example has things like RcppExports.cpp as well as additional flags which are not in your GH project. I suspect the issue is with the extra flags you're adding - those don't come from R. Please make sure you can replicate the is...
2020 Oct 19
2
Is there any way to check the class of an ALTREP?
...l, I would like to determine if an ALTREP object is from my package, I see there is a function `ALTREP_CLASS` defined in RInternal.h but its return value is neither a `R_altrep_class_t` object nor an STRSXP representing a class name. I do not know how to correctly use it. Any suggestions? Thanks, Jiefei [[alternative HTML version deleted]]
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
...\ } \ } \ else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr); \ } while (0) Best, Jiefei On Mon, Sep 23, 2019 at 3:12 PM Wang Jiefei <szwjf08 at gmail.com> wrote: > 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 al...
2020 Oct 07
2
Coercion function does not work for the ALTREP object
...signed on purpose, but I do not understand the reason behind it. Is there any reason why we are not consistent here? Here is my session info sessionInfo() R Under development (unstable) (2020-09-03 r79126) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362) Best, Jiefei [[alternative HTML version deleted]]
2020 Apr 03
4
The finalizer of the externalPtr does not work when closing R?
Hi all, I found that the finalizer of the externalPtr is not called when R is quitting. However, manually calling GC() works fine. This behavior is observed on devel R 2020-04-02 r78142 on Win and R 3.6.3 on Ubuntu. I make a reproducible package here: https://github.com/Jiefei-Wang/example Here is the detail of how to reproduce the problem, I create a temporary file in the package root path and make an external pointer. The finalizer of the external pointer will delete the temporary file when it is called. In the first round, I manually remove the external pointer from...
2020 Mar 11
0
R CMD INSTALL cannot recognize full path on Windows
Thanks a lot for your suggestions. I see what you mean. I have removed all unnecessary files and dependences on https://github.com/Jiefei-Wang/example, but still no luck. I've tried to install the package as a user, not admin, but I got the same error. Also, I apologize for spamming the mail list. I will keep my reply as neat as possible. Martin has suggested checking the encoding of the file and locale in the session info, so h...
2020 Sep 13
1
[External] Thread-safe R functions
Jiefei, Beyond the general response that Luke gave, to be a bit more specific to what you said, DATAPTR and INTEGER_GET_REGION involve ALTREP method execution (for ALTREP objects, obviously) so even they are not as simple and straightforward as they were a couple years ago. They should not (any longer) b...
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
...~G On Mon, Sep 23, 2019 at 6:12 PM Bob Rudis <bob at rud.is> wrote: > 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 is > > the macro definition from R_exts/Itermacros.h > > > > #de...
2019 Aug 28
3
What is the best way to loop over an ALTREP vector?
...one of the above functions has been defined, so package developers would not be bothered by tons of `if-else` statement if they want their package to work with ALTREP. Since it seems like there is no such function exist, what could be the best way to do the loop under the current R version? Best, Jiefei [[alternative HTML version deleted]]
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 is > the macro definition from R_exts/Itermacros.h > > #define ITERATE_BY_REGION_PARTIAL(sx...
2020 Sep 13
2
Thread-safe R functions
Hi, I am curious about whether there exist thread-safe functions in `Rinternals.h`. I know that R is single-threaded designed, but for the simple and straightforward functions like `DATAPTR` and `INTEGER_GET_REGION`, are these functions safe to call in a multi-thread environment? Best, Jiefei [[alternative HTML version deleted]]
2020 Mar 11
0
R CMD INSTALL cannot recognize full path on Windows
Thanks, Jiefei, unfortunately your example does not work on my system, and also it is far from minimal. The error message you are getting is from Windows and could be caused for example by accidental quoting of the path using single quotes. Issues with RStudio or devtools would have to be discussed in their...
2019 Sep 03
2
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...turn in these functions to indicate whether the vector has been sorted/ contains NA? My initial guess is 0/1 but since *NA_NA *uses 0 as its default value so it will be ambiguous. Are there any macros to define yes/no return values for these functions? I would appreciate any thought here. Best, Jiefei [[alternative HTML version deleted]]
2019 Jul 30
2
Questions regarding ALTREP_SET_ELT APIs
...nctions exported in Rinternal.h, but there is no corresponding ALTREP APIs to define them. The only way to set the value of an ALTREP is through a pointer, which will require that the ALTREP data is in memory. Is it on purpose? Will there be any plan to develop these ALTREP set element APIs? Best, Jiefei [[alternative HTML version deleted]]
2020 Mar 23
2
Inconsistant result for normalizePath on Windows
...[1] "C:\\windows1\\" In R 3.6, the return value always ends with a slash if the input ends with a slash. From the NEWS file, It seems like there are some changes to *normalizePath* but none of them should be relevant, it might be an unintentional result introduced by the update. Best, Jiefei [[alternative HTML version deleted]]
2020 Oct 19
0
Is there any way to check the class of an ALTREP?
> You happened to send a link which points to the OP's own package :) I > think Jiefei would like to know how one can "officially" determine if an > arbitrary ALTERP object belongs to a class that he owns. Argh, I am sorry! I did not notice that. My best bet for what I thought the question was is section 1.1.2 of R Internals where they note that: `unsigned int alt : 1; /...