search for: getlistelement

Displaying 8 results from an estimated 8 matches for "getlistelement".

Did you mean: get_list_element
2003 Sep 29
0
Calling C fn crashes (PR#4281)
...sh (``Rgui has generated errors and will be closed by Windows''): void init(SEXP rho, int *o){ SEXP vars = findVar(install("vars"), R_GlobalEnv); } This also crashes: void init(SEXP rho, int *o){ SEXP vars = findVar(install("vars"), rho); *o = INTEGER(getListElement(vars,"delta"))[0]; } (where GetListElement is that function from the R help) Further, if I source dyn.load("c_fns.dll") twice, R starts churning away, taking up 100% of the CPU to do nothing, until I pull up the task manager and kill R. This happens whether I've called dyn...
2009 Jan 05
1
can't get names of R_env
..._NamesSymbol); int i; Rprintf("List is of length:%d\n",length(list)); for (i = 0; i < length(list); i++) Rprintf("name of id:%d\t%s\n",i,CHAR(STRING_ELT(names, i))); } ----------------------- This is basicly just a copy of ----------------------- static SEXP getListElement(SEXP list, char *str) { SEXP elmt = R_NilValue, names = getAttrib(list, R_NamesSymbol); int i; for (i = 0; i < length(list); i++) if (strcmp(CHAR(STRING_ELT(names, i)), str) == 0) { elmt = VECTOR_ELT(list, i); break; } return elmt; } ----------------------- But this...
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
...arking). What exactly is as.altrep doing? Best, ~G On Tue, Jul 23, 2019 at 9:54 AM Michael Lawrence via R-devel < r-devel at r-project.org> wrote: > 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)? > > > >...
2019 Jul 24
1
[External] Re: Any plans for ALTREP lists (VECSXP)?
...Tue, Jul 23, 2019 at 9:54 AM Michael Lawrence via R-devel < > > r-devel at r-project.org> wrote: > > > >> 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...
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 they could be supported in a similar w...
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
2007 Nov 16
4
Returning vectors of two different data types back to R environment (from C).
Hello, Quick question. I have written a C function - I would like to make it return two vectors to the R environment - one STRSXP vector, and one INTSXP vector. Is this possible/ easy to do using the API? I looked, but could not find the answer to this question in the "Writing R Extensions" guide. Thanks very much for your help! Charles [[alternative HTML version deleted]]
2019 Jul 24
0
[External] Re: Any plans for ALTREP lists (VECSXP)?
...gt; Best, > ~G > > On Tue, Jul 23, 2019 at 9:54 AM Michael Lawrence via R-devel < > r-devel at r-project.org> wrote: > >> 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...