search for: vecsxps

Displaying 20 results from an estimated 137 matches for "vecsxps".

Did you mean: vecsxp
2011 Aug 13
1
Latent flaw in SEXPREC definition
There seems to be a latent flaw in the definition of struct SEXPREC in Rinternals.h, which likely doesn't cause problems now, but could if the relative sizes of data types changes. The SEXPREC structure contains a union that includes a primsxp, symsxp, etc, but not a vecsxp. However, in allocVector in memory.c, zero-length vectors are allocated using allocSExpNonCons, which appears to
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hello, I was wondering if there were any plans for ALTREP lists (VECSXP)? It seems to me that they could be supported in a similar way to how ALTSTRING works, with Elt() and Set_elt() methods, or would there be some problems with that I?m not seeing due to lists not being atomic vectors? I was taking an approach of converting each list element (of a file-based list data structure) to an ALTREP
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
2010 Mar 11
1
Shrinking a List
Hello, I create a VECSXP(call it A) with size N(~ 5000), i then proceed to fill the elements and find out I don't need to fill more than M (M<< N). Thus if i return A to the user's R code, he/she will see a list of length 5K of which N-M are NULLs. To avoid this, I create a new VECSXP B of length M and /duplicate/ the elements of A. Since I do this often, it appears to be wasteful,
2013 Jul 05
1
Get the tail of a list in C
Hi, I am write R extensions in C. Now I have a VECSXP variable, so how can I get the tail of it (all but the first one) as a new VECSXP. I tried CDR(), but it gives error. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Get-the-tail-of-a-list-in-C-tp4670900.html Sent from the R devel mailing list archive at Nabble.com.
2018 Feb 01
2
as.list method for by Objects
On Thu, Feb 1, 2018 at 12:14 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>>> on Tue, 30 Jan 2018 15:57:42 -0800 writes: > > > I just meant that the minimal contract for as.list() appears to be that it > > returns a VECSXP. To the user, we might say
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hi Kylie, Is it a list with only numerics in it? (I only see REALSXPs there, but obviously inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential benefit here being that the underlying large vector could then be a big out-of-memory altrep. How
2005 Nov 07
3
R thread safe
Dear R-dev, I would like to accelerate my R computation by using parallel OpenMP compilers (e.g from Pathscale) on a 2-processor AMD server and I would like to know whether R is a tread safe library. The main kernel of the OpenMP parallelization is a C SEXP function that performs the computational routine in parallel with: ******************* SEXP example(SEXP list, SEXP expr, SEXP rho) {
2019 Jul 24
1
[External] Re: Any plans for ALTREP lists (VECSXP)?
I can work on this. Thanks Luke. ~G On Wed, Jul 24, 2019 at 8:25 AM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > 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
2016 Aug 05
2
Extra copies of objects in environments when using $ operator?
My understanding is that R will not make copies of lists if there is only one reference to the object. However, I've encountered a case where R does make copies, even though (I think) there should be only one reference to the object. I hope that someone could shed some light on why this is happening. I'll start with a simple example. Below, x is a list with one element, and changing that
2009 Mar 30
1
Setting the names attribute of a list?
Hello, I have created a vector with 2 elements(see code below) I am calling this function many thousands of times (hundreds of thousands) after some time i get *** caught segfault *** address 0x5, cause 'memory not mapped' However, if i dont set the R_NamesSymbol, I do not get any such error. Am I doing this correctly? Thank you Saptarshi ==CODE=== // kxp and usar are two SEXP's
2005 Jun 29
1
Viewing R objects in gdb
I'm trying to track down a bug in some experimental code, where an object's attribute is getting messed up. This means I'd like to examine R objects while within gdb. One of the things I'd like to do is to examine the names of all the attributes. This is exactly what an example in the R Extensions manual section 4.11.2 "Inspecting R objects when debugging" does,
2018 Jan 30
2
as.list method for by Objects
I just meant that the minimal contract for as.list() appears to be that it returns a VECSXP. To the user, we might say that is.list() will always return TRUE. I'm not sure we can expect consistency across methods beyond that, nor is it feasible at this point to match the semantics of the methods package. It deals in "class space" while as.list() deals in "typeof() space".
2014 Jun 24
2
using C code to create data frame but always return as list
there is my code,  expect return value  is a data frame but R say it is list: SEXP Julia_R_MD_NA_DataFrame(jl_value_t* Var) {  SEXP ans,names,rownames;  char evalcmd[4096];  int i;  const char* dfname="DataFrameName0tmp";  jl_set_global(jl_main_module, jl_symbol(dfname), (jl_value_t*)Var);  //Get Frame cols   sprintf(evalcmd,"size(%s,2)",dfname);  jl_value_t*
2009 Sep 20
1
Return a list from a .Call but segfaults
Hello, I call a function via .Call passing to it a raw vector(D) and an integer(I) The vector is a series K1,KData1, V1,VData1, K2, KData2, ... where the integer K1 is the length of Data1 and similarly for Ki (wrt Datai)(similarly for V*) There 2*I such pairs( (Ki,KDatai), (Vi,VDatai)) The numbers Ki(and Vi) are written in network order. I am returning a list of I elements each element a
2018 Feb 01
0
as.list method for by Objects
>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>> on Tue, 30 Jan 2018 15:57:42 -0800 writes: > I just meant that the minimal contract for as.list() appears to be that it > returns a VECSXP. To the user, we might say that is.list() will always > return TRUE. Indeed. I also agree with Herv'e that the user level
2014 Jun 26
1
using 2D array of SEXP for creating dataframe
Hi , For our production package i need to create a dataframein C . So I wrote the following code SEXP dfm ,head,df , dfint , dfStr,lsnm; *SEXP valueVector[2];* char *ab[3] = {"aa","vv","gy"}; int sn[3] ={99,89,12}; char *listnames[2] = {"int","string"}; int i,j; //============================= PROTECT(df = allocVector(VECSXP,2));
2011 Jan 11
1
as.environment.list provides inconsistent results under torture
Hello, Using R-devel (rev 53950), I get inconsistent results with as.environment( VECSXP ) when gctorture is on. Consider: a <- list( aa = rnorm, bb = runif ) gctorture(TRUE) as.environment( a ) The last line sometimes produces the correct environment, but sometimes I get errors. Here are the three situations: # good > as.environment( a ) <environment: 0x100b1c978> # not good
2013 Apr 01
2
Timing of SET_VECTOR_ELT
Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.) PROTECT(means2 = allocVector(REALSXP, nvar)); means = REAL(means2); PROTECT(u2 = allocVector(REALSXP, nvar)); u =