search for: envsxp

Displaying 20 results from an estimated 32 matches for "envsxp".

2006 Jun 03
3
More on bug 7924
...= 0, gcgen = 0, gccls = 1}, attrib = 0x508818, gengc_next_node = 0x6db278, gengc_prev_node = 0x8442b8, u = {primsxp = { offset = 2}, symsxp = {pname = 0x2, value = 0x230002acc2, internal = 0x21000090}, listsxp = {carval = 0x2, cdrval = 0x230002acc2, tagval = 0x21000090}, envsxp = {frame = 0x2, enclos = 0x230002acc2, hashtab = 0x21000090}, closxp = {formals = 0x2, body = 0x230002acc2, env = 0x21000090}, promsxp = {value = 0x2, expr = 0x230002acc2, env = 0x21000090}}} #0 DEBUG_SET_NAMED (x=0x85cfd8, v=2) at ../../../r-devel/r-devel/ R/src/main/...
2009 Jan 05
1
can't get names of R_env
...ght not have the R specific jargon. But here is my problem, I'm trying to access and use variabels given by a function environment, more specifically the rho in do_optim in src/main/optim.c According to the documentation http://cran.r-project.org/doc/manuals/R-ints.html#The-_0027data_0027 the envsxp is defined as a tagged pairlist. "ENVSXP: Pointers to the frame, enclosing environment and hash table (NULL or a VECSXP). A frame is a tagged pairlist with tag the symbol and CAR the bound value." But I'm having troubles accessing the data. I've written a small function called p...
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
2013 Aug 18
1
How does R_UnboundValue and removing variables work?
Reading "R Internals" made me believe that R_UnboundValue was a placeholder that would be skipped over in variable lookup. viz. the section of R Internals "Hash tables" says "items are not actually deleted but have their value set to R_UnboundValue.", which seems to align with what I read in envir.c. So, I reasoned, if I have a function that returns R_UnboundValue,
2011 Nov 07
1
Accessing ENVSXP and CLOSXP while processing parsed R code
Hello Guys, Following up my earlier mail where I am trying to write an alternative front-end for R, I had a question about accessing the closures and environments in R code. Here's the function taken and modified a little from "*Lexical Scope and Statistical Computing*" ===================================================================== f<-function(){
2009 Oct 01
2
creating environments in package's C code
Dear developers, is it possible to create environments in C code of packages? Simply using SEXP env; PROTECT (env = allocSExp(ENVSXP)); and assigning the enclosing environment with SET_ENCLOS seems to be insufficient. Best wishes, Martin -- Dr. Martin Becker Statistics and Econometrics Saarland University Campus C3 1, Room 206 66123 Saarbruecken Germany
2016 Aug 05
0
Extra copies of objects in environments when using $ operator?
...t;" > e$x[[1]] <- 2 > # tracemem[0x1148c1708 -> 0x11b2fc1b8]: Currently e$x marks values as immutable if they have any references by setting NAMED to 2. You can 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...
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...(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 REALSXP CPLXSXP STRSXP DOTSX...
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
...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 1 0 341 2...
2009 Jun 25
1
R data inspection under gdb?
...0, trace = 0, spare = 0, gcgen = 0, gccls = 1}, attrib = 0x608f98, gengc_next_node = 0xa82328, gengc_prev_node = 0xa822c8, u = {primsxp = {offset = 1}, symsxp = { pname = 0x1, value = 0x146fb50, internal = 0x2000000a}, listsxp = {carval = 0x1, cdrval = 0x146fb50, tagval = 0x2000000a}, envsxp = {frame = 0x1, enclos = 0x146fb50, hashtab = 0x2000000a}, closxp = {formals = 0x1, body = 0x146fb50, env = 0x2000000a}, promsxp = {value = 0x1, expr = 0x146fb50, env = 0x2000000a}}} which suggests to me that x is not "void" (whatever that's supposed to mean here). What I'...
2016 May 20
2
identical on closures
...alue) @15a65d8 19 VECSXP g0c1 [MARK] (len=1, tl=0) @10f3dd0 13 INTSXP g0c3 [OBJ,MARK,ATT] (len=8, tl=0) 1,15,1,15,15,... ATTRIB: @cc9618 02 LISTSXP g0c0 [MARK] TAG: @60dde0 01 SYMSXP g0c0 [MARK,NAM(2),LCK,gp=0x4000] *"srcfile" *(has value) *@cc97d8* 04 *ENVSXP* g0c0 [OBJ,MARK,NAM(2),ATT] <0xcc97d8> @cca8a8 03 CLOSXP g0c0 [MARK,NAM(2),ATT] FORMALS: @604b58 00 NILSXP g0c0 [MARK,NAM(2)] BODY: @cc9eb8 06 LANGSXP g0c0 [MARK,ATT] @604998 01 SYMSXP g0c0 [MARK,LCK,gp=0x5000] "{" (has value) ATTRIB: @cc9da0 02 LISTSXP g0c0 [MARK]...
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
...f 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 REALSXP CPLXSXP STRSXP DOTSXP...
2004 Dec 28
2
Configuration of memory usage
...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 REALSXP CPLXSXP STRSXP DOTSXP...
2023 Nov 15
1
saveRDS()/readRDS() on environments
Dear r-devel, I was surprised to see that saveRDS() and readRDS() work quite well with environments, see below: ``` z <- 3 # in global env y <- new.env() y$a <- 1 x <- new.env(parent = y) x$b <- 2 saveRDS(x, "x.RDS") # in a new session x <- readRDS("x.RDS") y <- parent.env(x) x$b #> [1] 2 y$a #> [1] 1 parent.env(y) #> <environment:
2010 Aug 29
1
Feature request: put NewEnvironment and R_NewhashedEnv into API
Hi, as Seth Falcon in 2006, I also need to create new environments from package C code. Unfortunately, both NewEnvironment and R_NewHashedEnv are not yet part of the public API, if I understand correctly. Is it planned to add at least one of these functions to the public API in the near future? May I submit a patch? Otherwise I would need to re-implement much of the functionality of R
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
1998 Jul 01
4
R-beta: R-0.62.1 under Digital Unix
I am grateful for the advice of Douglas Bates on my earlier problem in making R-0.62.1, but I'm afraid I'm still having problems.... I have been installing the various updates to R for quite some time on my alpha, and it is only now that I have been having really severe problems. The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I needed to install GNU make. For
2006 Jun 02
2
Helping out - simple bugs to help familiarize with R design, source, etc
Hi All, Well I finally have found the time to get svn working and I have successfully built my own tuned atlas (multi-threaded version) libs and have both the r-devel and r-patched trees building daily on my box. The problem is I still do not have a good idea of the layout and design of R, and typically I "learn by doing" by trying to fix a bug that hits me. Unfortunately ;-)