Displaying 15 results from an estimated 15 matches for "builtinsxp".
2009 Sep 12
1
Access to integer value of BUILTINSXP/SPECIALSXP
Hello,
For the BUILTINSXP and SPECIALSXP types, the R Internals page documents
"An integer giving the offset into the table of primitives/.Internals. "
What macro gives me the value of this integer? I guess something like
this would work
had R_USEINTERNALS been defined
v->u.primsxp.offset
(where v is a SEXP...
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...)
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 DOTSXP ANYSXP VECSXP EXPRSXP
13383 9 24870 0 0 2598 2
BCODESX...
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
...ng -------------
--- 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 0 0 0
---------------- Just before the crash ------------
--- gc() returns:...
2005 Jan 03
2
Memory problem ... Again
...16794 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 ANYSXP VECSXP EXPRSXP
13382 9 60170 0 0 26003 0
BCODESXP E...
2004 Dec 28
2
Configuration of memory usage
...ls 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 ANYSXP VECSXP EXPRSXP
13382 9 60173 0 0 26002 0
BCODESXP E...
2010 Jan 14
1
how to call a function from C
Hi,
In Rcpp, we now have a "Function" class to encapsulate functions (they
cover all three kinds, but this may change).
To call the function, what we do is generate a call with the function as
the first node and then evaluate the call.
SEXP stats = PROTECT( R_FindNamespace( mkString( "stats") ) );
SEXP rnorm = PROTECT( findVarInFrame( stats, install( "rnorm") ) )
2007 Jul 04
2
problem with findFun call from embedded R
I was debugging a problem reported to me regarding PL/R, and found that
I can duplicate it using only R sources. It might be characterized as
possibly a misuse of the findFun() function, but I leave that for the R
devel experts to decide.
The below results are all with R-2.5.1 (I can't seem to download
r-patched at the moment, but didn't see anything in the 2.5.1-patched
release
2002 Aug 06
2
Memory leak in R v1.5.1?
...rigger (Mb) limit (Mb)
Ncells 554338 14.9 565000 15.1 16.1
Vcells 467858 3.6 1310720 10.0 20.0
> memory.profile()
NILSXP SYMSXP LISTSXP CLOSXP ENVSXP PROMSXP
LANGSXP
1 5031 264110 1401 16047 0
60670
SPECIALSXP BUILTINSXP CHARSXP LGLSXP INTSXP
59 503 29179 1682 0 0
24
REALSXP CPLXSXP STRSXP DOTSXP ANYSXP VECSXP
EXPRSXP
135616 8 23982 0 0 16053
0
EX...
2012 Nov 15
1
bug with mapply() on an S4 object
Hi,
Starting with ordinary vectors, so we know what to expect:
> mapply(function(x, y) {x * y}, 101:106, rep(1:3, 2))
[1] 101 204 309 104 210 318
> mapply(function(x, y) {x * y}, 101:106, 1:3)
[1] 101 204 309 104 210 318
Now with an S4 object:
setClass("A", representation(aa="integer"))
a <- new("A", aa=101:106)
> length(a)
2009 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file
takes too long if the file is big. Most of the time, I only interested what
the variables are in the the file and the attributes of the variables (like
if it is a data.frame, matrix, what are the colnames/rownames, etc.)
I'm wondering if there is any facility in R to help me avoid loading the
whole file.
2019 Nov 05
1
Questions on the R C API
Thank you for your reply Jiefei.
I think in theory your solution should work. I'll have to give them a try.
On Mon, 4 Nov 2019 23:41 Wang Jiefei, <szwjf08 at gmail.com> wrote:
> Hi Morgan,
>
> My solutions might not be the best one(I believe it's not), but it should
> work for your question.
>
> 1. Have you considered Rf_duplicate function? If you want to change
2009 Jan 30
2
Problem installing RMySQL ("S4R.h:40:17: error: S.h: No such file or directory"?)
...' undeclared here (not in a function)
RS-DBI.c:1270: error: 'PROMSXP' undeclared here (not in a function)
RS-DBI.c:1271: error: 'LANGSXP' undeclared here (not in a function)
RS-DBI.c:1272: error: 'SPECIALSXP' undeclared here (not in a function)
RS-DBI.c:1273: error: 'BUILTINSXP' undeclared here (not in a function)
RS-DBI.c:1274: error: 'CHARSXP' undeclared here (not in a function)
RS-DBI.c:1275: error: 'LGLSXP' undeclared here (not in a function)
RS-DBI.c:1276: error: 'INTSXP' undeclared here (not in a function)
RS-DBI.c:1277: error: 'REALS...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...ctor
VECSXP | Rcpp::List
EXPRSXP | Rcpp::ExpressionVector
----------------------------------------------------------
ENVSXP | Rcpp::Environment
SYMSXP | Rcpp::Symbol
----------------------------------------------------------
CLOSXP |
BUILTINSXP | Rcpp::Function
SPECIALSXP |
----------------------------------------------------------
LANGSXP | Rcpp::Language
LISTSXP | Rcpp::Pairlist
----------------------------------------------------------
S4SXP | Rcpp::S4
--------------------------...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...ctor
VECSXP | Rcpp::List
EXPRSXP | Rcpp::ExpressionVector
----------------------------------------------------------
ENVSXP | Rcpp::Environment
SYMSXP | Rcpp::Symbol
----------------------------------------------------------
CLOSXP |
BUILTINSXP | Rcpp::Function
SPECIALSXP |
----------------------------------------------------------
LANGSXP | Rcpp::Language
LISTSXP | Rcpp::Pairlist
----------------------------------------------------------
S4SXP | Rcpp::S4
--------------------------...