search for: nilsxp

Displaying 20 results from an estimated 30 matches for "nilsxp".

Did you mean: nils
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
2016 Aug 05
0
Extra copies of objects in environments when using $ operator?
...an see this with > e <- new.env(parent = emptyenv()) > e$x <- list(1) > .Internal(inspect(e)) @30b2498 04 ENVSXP g0c0 [NAM(1)] <0x30b2498> ENCLOS: @2600e98 04 ENVSXP g0c0 [MARK,NAM(2)] <R_EmptyEnv> HASHTAB: @2e41540 19 VECSXP g0c7 [] (len=29, tl=1) @25c9628 00 NILSXP g0c0 [MARK,NAM(2)] @25c9628 00 NILSXP g0c0 [MARK,NAM(2)] @25c9628 00 NILSXP g0c0 [MARK,NAM(2)] @25c9628 00 NILSXP g0c0 [MARK,NAM(2)] @30b3370 02 LISTSXP g0c0 [] TAG: @2637870 01 SYMSXP g0c0 [MARK,NAM(2)] "x" @3569488 19 VECSXP g0c1 [NAM(1)] (len=1, tl=0)...
2005 Mar 16
1
function-like macros undefined
Hi, Somehow function-like macros from Rinternals.h are not defined when I include the file. foo.c ################## #include <R.h> #include <Rinternals.h> #ifndef NILSXP #error("NILSXP") #endif #ifndef INTEGER #error("INTEGER") #endif ################### When compiled: vor/src% gcc -I/usr/local/lib/R/include -g -O2 -c foo.c -o foo.o foo.c:11:2: #error ("INTEGER") Note that NILSXP is defined. This is true for some other function...
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...; pseudo.hist <- aggregate(duration, list(Delta), length) > colnames(pseudo.hist) <- c("Delta", "N") > detach(profiles) > gc() used (Mb) gc trigger (Mb) Ncells 701188 18.8 2683553 71.7 Vcells 1447712 11.1 8201413 62.6 > memory.profile() NILSXP SYMSXP LISTSXP CLOSXP ENVSXP PROMSXP LANGSXP 1 7228 244243 3949 495 773 113819 SPECIALSXP BUILTINSXP CHARSXP LGLSXP INTSXP 207 1177 283663 4661 0 0 49...
2001 Dec 07
2
Memory problem
Dear all, I have written a little R program to convert images. See below. Within the loop over j (the filenames) memory consumption grows constantly. rm( ... ) inside the loop did not help. Memory does not grow if I remove the writeBin statements between the two #-------- marks. But obviously this is not solution I want... Thanks for any advice. Manfred Baumstark P.S. As I'm new to R:
2002 Oct 14
1
R 1.6.0 Solaris crash with xmalloc: out of virtual memory
...c, solaris2.7 status major 1 minor 6.0 year 2002 month 10 day 01 language R ----------------- At the beginning ------------- --- gc() returns: used (Mb) gc trigger (Mb) Ncells 254150 6.8 467875 12.5 Vcells 408499 3.2 886807 6.8 --- memory.profile() returns: NilSXP SymSXP ListSXP CloSXP EnvSXP PromSXP LangSXP SpecialSXP 1 4919 128880 1440 13 18 63607 59 BUILTINSXP CHARSXP LGLSXP - - INTSXP REALSXP CPLXSXP STRSXP 513 37178 1712 0 0 237 9047 8 10201 DOTSXP ANYSXP VECSXP EXPRSXP - EXTPTRSXP WEAKREFSXP...
2019 Dec 15
4
source definition for R_NilValue/return from TYPEOF(R_NilValue)
Hello, for reasons I want to know the return value of TYPEOF(R_NilValue), I expect it to be NILSXP, but I can't find this documented anywhere. Ideally, I'd like to see the source definition of R_NilValue, but after fair bit of searching I cannot find an obviously location for this. Would someone please point me in the right direction? thanks -- CRICOS provider code 00123M
2020 Sep 06
8
some questions about R internal SEXP types
...answers for in the R-ints doc or hadley/r-internals. 1. In R-ints, the LISTSXP SEXP type CDR is said to hold "usually" LISTSXP or NULL. What does the "usually" mean here? Is it possible for the CDR to hold values other than LISTSXP or NULL, and is this?NULL NILSXP or C NULL? I assume that the CAR can hold any type of?SEXP, is this correct? 2. The LANGSXP and DOTSXP types are lists, but the R-ints comments on them do not say whether the CDR of one of these lists is the same at the head of the list of devolves to a LISTSXP. Looking through...
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...makeUserAgent)); // defaults to ,TRUE SEXP utilsNS = PROTECT(R_FindNamespace(mkString("utils"))); - sheaders = eval(agentFun, utilsNS); + struct urlconn *uc = con->private; + sagent = eval(agentFun, utilsNS); UNPROTECT(1); /* utilsNS */ - PROTECT(sheaders); - if(TYPEOF(sheaders) == NILSXP) - headers = NULL; + PROTECT(sagent); + if(TYPEOF(sagent) == NILSXP) + agent = NULL; else - headers = CHAR(STRING_ELT(sheaders, 0)); - ctxt = in_R_HTTPOpen(url, headers, 0); + agent = CHAR(STRING_ELT(sagent, 0)); + ctxt = in_R_HTTPOpen(url, agent, uc->headers, 0); UNPROTECT(2);...
2016 May 20
2
identical on closures
...rcref attribute of the two instances of the functions contain different environments, AFAICT. Environments are compared only by exact pointer, so this forces return FALSE. Snippets from .Internal(inspect(x)) and .Internal(inspect(y)): @cca008 03 CLOSXP g0c0 [MARK,NAM(2),ATT] FORMALS: @604b58 00 NILSXP g0c0 [MARK,NAM(2)] BODY: @cc9650 06 LANGSXP g0c0 [MARK,ATT] @604998 01 SYMSXP g0c0 [MARK,LCK,gp=0x5000] "{" (has value) ATTRIB: @cc9570 02 LISTSXP g0c0 [MARK] TAG: @60dd70 01 SYMSXP g0c0 [MARK,LCK,gp=0x4000] "srcref" (has value) @15a65d8 19 VECSXP g0c1 [M...
2016 May 20
2
identical on closures
I'm confused by this: > identical(function() {}, function() {}) [1] FALSE Yet, after loading the Matrix package (which redefines det), the following is checked (in library.checkConflicts): > identical(get("det", baseenv()), get("det", asNamespace("Matrix")), ignore.environment=T) [1] TRUE I've looked at the code in identical.c and for closures it
2005 Jan 03
2
Memory problem ... Again
...ormalizing...Error: cannot allocate vector of size 594075 Kb > gc() used (Mb) gc trigger (Mb) Ncells 797971 21.4 1710298 45.7 Vcells 76716794 585.4 305954055 2334.3 ... > mem.limits() nsize vsize NA NA > object.size(Data) [1] 608355664 > memory.profile() NILSXP SYMSXP LISTSXP CLOSXP ENVSXP PROMSXP LANGSXP 1 30484 372383 4845 420 180 127274 SPECIALSXP BUILTINSXP CHARSXP LGLSXP INTSXP 203 1168 111430 5296 0 0 44650...
2004 Mar 26
4
cbind/rbind fail on matrixes containing lists (PR#6702)
Today's R 1.9.0 beta: > m1 [,1] [,2] [,3] [,4] [1,] NA NA NA NA [2,] NA NA NA NA [3,] NA NA NA NA [4,] NA NA NA NA > class(m1[1,1]) [1] "list" > cbind(m1,m1) Error in cbind(...) : cannot create a matrix from these types > rbind(m1,m1) Error in rbind(...) : cannot create a matrix from these types > version _
2020 Sep 08
0
some questions about R internal SEXP types
...c or hadley/r-internals. > > 1. In R-ints, the LISTSXP SEXP type CDR is said to hold "usually" > LISTSXP or NULL. What does the "usually" mean here? Is it possible > for the CDR to hold values other than LISTSXP or NULL, and is > this?NULL NILSXP or C NULL? I assume that the CAR can hold any type > of?SEXP, is this correct? > 2. The LANGSXP and DOTSXP types are lists, but the R-ints comments on > them do not say whether the CDR of one of these lists is the same at > the head of the list of devolves to a...
2007 Jul 04
2
problem with findFun call from embedded R
...NamedCall.c:16 8<------------------------ And then stepping into line 719 generates the segfault: 8<------------------------ (gdb) s Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaab701ce in Rf_findVar (symbol=0x6c12b8, rho=0x0) at envir.c:998 998 if (TYPEOF(rho) == NILSXP) 8<------------------------ I believe this is happening because findFun() was not executed inside a valid context, and therefore R_ToplevelContext->cjmpbuf is invalid. My question is -- is the above an abuse of findFun() by RNamedCall.c (meaning I should avoid the same pattern)? Or maybe...
2018 Oct 10
1
unlockEnvironment()?
...nual/encapsulation.R:7: #define FRAME_IS_LOCKED(e) (ENVFLAGS(e) & FRAME_LOCK_MASK) ./R6/tests/manual/encapsulation.R:8: #define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK)) ./R6/tests/manual/encapsulation.R-9- ./R6/tests/manual/encapsulation.R-10- if (TYPEOF(env) == NILSXP) ./BMA/R/iBMA.glm.R-21-*/ ./BMA/R/iBMA.glm.R-22-#define FRAME_LOCK_MASK (1<<14) ./BMA/R/iBMA.glm.R:23:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) & FRAME_LOCK_MASK) ./BMA/R/iBMA.glm.R:24:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK)) ./BMA/R/iBMA.glm.R-25-'...
2004 Dec 28
2
Configuration of memory usage
...orrection : pmonly expression values: liwong normalizing...Error: cannot allocate vector of size 594075 Kb > gc() used (Mb) gc trigger (Mb) Ncells 797983 21.4 1710298 45.7 Vcells 76716811 585.4 305954068 2334.3 > object.size(Data) [1] 608355664 > memory.profile() NILSXP SYMSXP LISTSXP CLOSXP ENVSXP PROMSXP LANGSXP 1 30484 372373 4845 420 180 127274 SPECIALSXP BUILTINSXP CHARSXP LGLSXP INTSXP 203 1168 111434 5296 0 0 44649...
2020 Sep 08
0
some questions about R internal SEXP types
...EXP type CDR is said to hold >>> "usually" >>> LISTSXP or NULL. What does the "usually" mean here? Is it >>> possible >>> for the CDR to hold values other than LISTSXP or NULL, and >>> is >>> this NULL NILSXP or C NULL? I assume that the CAR can hold >>> any type >>> of SEXP, is this correct? >>> 2. The LANGSXP and DOTSXP types are lists, but the R-ints >>> comments on >>> them do not say whether the CDR of one of these lists is the >&...
2009 Sep 03
1
Running an expression 1MN times using embedded R
...SEXP runner1,runner2; PROTECT(runner1=rexpress("expression({ for(x in 1:5) { .Call('rh_status','x') }})")); if (runner1 == R_NilValue){ UNPROTECT(1); exit(1); } PROTECT(runner2=Rf_lang2(Rf_install("eval"),runner1)); if(runner2==NILSXP){ UNPROTECT(2); exit(1); } int mapbuf_cnt = 0; for(;;){ if(mapbuf_cnt >1000000) exit(0); Rf_eval(runner2 ,R_GlobalEnv); mapbuf_cnt++; } UNPROTECT(2); }
2023 Apr 23
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
...evaluation of expressions happening over time during the lifespan of the process. I tried either `R_eval()` and `R_tryEval()` for the evaluation. The issue I have is that the processing of warnings does not happen until the process exits and/or R is shut down. Evaluating `warnings()` returns NULL (NILSXP). It seems like the warnings are stuck in a list out of `warnings()`'s reach, waiting to be processed. I cannot seem to find why or how to force that to happen. The embedded R is interactive (R_Interactive is 1). Moreover, when the evaluation of another R expression after the warnings results...