Displaying 20 results from an estimated 20 matches for "exprsxp".
Did you mean:
exprs
2018 May 08
2
unlist errors on a nested list of empty lists
...mes))
>
> (with both recursive and use.names being TRUE), which returns NULL.
And the problem is in the islistfactor function in src/main/apply.c,
which looks like this:
static Rboolean islistfactor(SEXP X)
{
int i, n = length(X);
switch(TYPEOF(X)) {
case VECSXP:
case EXPRSXP:
if(n == 0) return NA_LOGICAL;
for(i = 0; i < LENGTH(X); i++)
if(!islistfactor(VECTOR_ELT(X, i))) return FALSE;
return TRUE;
break;
}
return isFactor(X);
}
One of those deeply nested lists is length 0, so at the lowest level it
returns...
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...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
BCODESXP EXTPTRSXP WEAKREFSXP
0 93 0
> memory.size(max = TRUE)
[1] 224669696
> memory.size(max = FALSE)
[1] 81072656
> attach(pseudo.hist)
> pseudo.hist <- pseudo.hist[or...
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
...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:
used (Mb) gc trigger (Mb)
Ncells 347539 9.3 597831 16.0
Vcells 566319 4.4 1103261 8.5
--- memory.profile() returns:
NilSXP SymSXP...
2018 May 09
2
unlist errors on a nested list of empty lists
...> And the problem is in the islistfactor function in src/main/apply.c,
> which looks like this:
>
> static Rboolean islistfactor(SEXP X)
> {
> ? ? ?int i, n = length(X);
>
> ? ? ?switch(TYPEOF(X)) {
> ? ? ?case VECSXP:
> ? ? ?case EXPRSXP:
> ? ? ? ? ?if(n == 0) return NA_LOGICAL;
> ? ? ? ? ?for(i = 0; i < LENGTH(X); i++)
> ? ? ? ? ? ? ?if(!islistfactor(VECTOR_ELT(X, i))) return FALSE;
> ? ? ? ? ?return TRUE;
> ? ? ? ? ?break;
> ? ? ?}
> ? ? ?return isFactor(X);
> }
&g...
2018 May 08
0
unlist errors on a nested list of empty lists
...being TRUE), which returns NULL.
>
> And the problem is in the islistfactor function in src/main/apply.c,
> which looks like this:
>
> static Rboolean islistfactor(SEXP X)
> {
> int i, n = length(X);
>
> switch(TYPEOF(X)) {
> case VECSXP:
> case EXPRSXP:
> if(n == 0) return NA_LOGICAL;
> for(i = 0; i < LENGTH(X); i++)
> if(!islistfactor(VECTOR_ELT(X, i))) return FALSE;
> return TRUE;
> break;
> }
> return isFactor(X);
> }
>
> One of those deeply nested list...
2018 May 08
2
unlist errors on a nested list of empty lists
Reproducible example:
x <- list(list(list(), list()))
unlist(x)
*> Error in as.character.factor(x) : malformed factor*
What should happen:
unlist(x)
> NULL
R.version
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 5.0
year 2018
month 04
day
2024 Apr 27
1
Should c(..., recursive = TRUE) and unlist(x, recursive = TRUE) recurse into expression vectors?
Reading the body of function 'AnswerType' in bind.c, called from 'do_c'
and 'do_unlist', I notice that EXPRSXP and VECSXP are handled identically
in the recurse = TRUE case.
A corollary is that c(recursive = TRUE) and unlist(recursive = TRUE)
treat expression vectors like expression(a, b) as lists of symbols and
calls. And since they treat symbols and calls as lists of length 1, we
see:
> x &l...
2018 May 09
0
unlist errors on a nested list of empty lists
...actor function in src/main/apply.c,
> > which looks like this:
> >
> > static Rboolean islistfactor(SEXP X)
> > {
> > int i, n = length(X);
> >
> > switch(TYPEOF(X)) {
> > case VECSXP:
> > case EXPRSXP:
> > if(n == 0) return NA_LOGICAL;
> > for(i = 0; i < LENGTH(X); i++)
> > if(!islistfactor(VECTOR_ELT(X, i))) return FALSE;
> > return TRUE;
> > break;
> > }
> >...
2005 Jan 03
2
Memory problem ... Again
...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 EXTPTRSXP WEAKREFSXP
0 106 0
2004 Dec 28
2
Configuration of memory usage
...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 EXTPTRSXP WEAKREFSXP
0 106 0
Although I have no idea of memory allocation in R, apparently something's
wrong with this. The memory problem must have nothing to do with physical
mem...
2008 Feb 19
1
level of mutability for the type of a SEXP
Dear list,
I am writing C code to interface with R, and I would like to know the
level of mutability for the type of a SEXP.
I see that there is a macro/function TYPEOF(), and that it can be used
as an l-value, as well as a macro/function SET_TYPEOF().
My question is "should the type be considered immutable, or it can it
change after the SEXP has been created and used for a while ?".
2009 Jul 09
1
bug in seq_along
Using the IRanges package from Bioconductor and somewhat recent R-2.9.1.
ov = IRanges(1:3, 4:6)
length(ov) # 3
seq(along = ov) # 1 2 3 as wanted
seq_along(ov) # 1!
I had expected that the last line would yield 1:3. My guess is that
somehow seq_along don't utilize that ov is an S4 class with a length
method.
The last line of the *Details* section of ?seq has a typeo. Currently
it is
2002 Aug 06
2
Memory leak in R v1.5.1?
...GSXP
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
EXTPTRSXP WEAKREFSXP
0 0 0
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ....
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.
2010 Sep 08
0
Correction to vec-subset speed patch
...ult)[i].r = NA_REAL;
- COMPLEX(result)[i].i = NA_REAL;
- }
- break;
- case STRSXP:
- if (0 <= ii && ii < nx && ii != NA_INTEGER)
- SET_STRING_ELT(result, i, STRING_ELT(x, ii));
- else
- SET_STRING_ELT(result, i, NA_STRING);
- break;
- case VECSXP:
- case EXPRSXP:
- if (0 <= ii && ii < nx && ii != NA_INTEGER)
- SET_VECTOR_ELT(result, i, VECTOR_ELT(x, ii));
- else
- SET_VECTOR_ELT(result, i, R_NilValue);
- break;
- case LISTSXP:
+ switch (mode) {
+ case LGLSXP:
+ for (i = 0; i<n; i++)
+ if ((ii=I...
2009 Jan 30
2
Problem installing RMySQL ("S4R.h:40:17: error: S.h: No such file or directory"?)
...PLXSXP' undeclared here (not in a function)
RS-DBI.c:1279: error: 'STRSXP' undeclared here (not in a function)
RS-DBI.c:1280: error: 'DOTSXP' undeclared here (not in a function)
RS-DBI.c:1281: error: 'ANYSXP' undeclared here (not in a function)
RS-DBI.c:1282: error: 'EXPRSXP' undeclared here (not in a function)
RS-DBI.c:1283: error: 'VECSXP' undeclared here (not in a function)
RS-DBI.c:1284: error: 'RAWSXP' undeclared here (not in a function)
make: *** [RS-DBI.o] Error 1
chmod: cannot access
`/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2....
2010 May 17
0
Rcpp 0.8.0 on CRAN
...INTSXP | Rcpp::IntegerVector
REALSXP | Rcpp::NumericVector
RAWSXP | Rcpp::RawVector
LGLSXP | Rcpp::LogicalVector
CPLXSXP | Rcpp::ComplexVector
STRSXP | Rcpp::CharacterVector
VECSXP | Rcpp::List
EXPRSXP | Rcpp::ExpressionVector
----------------------------------------------------------
ENVSXP | Rcpp::Environment
SYMSXP | Rcpp::Symbol
----------------------------------------------------------
CLOSXP |
BUILTINSXP | Rcpp::Function
SPECIALS...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...INTSXP | Rcpp::IntegerVector
REALSXP | Rcpp::NumericVector
RAWSXP | Rcpp::RawVector
LGLSXP | Rcpp::LogicalVector
CPLXSXP | Rcpp::ComplexVector
STRSXP | Rcpp::CharacterVector
VECSXP | Rcpp::List
EXPRSXP | Rcpp::ExpressionVector
----------------------------------------------------------
ENVSXP | Rcpp::Environment
SYMSXP | Rcpp::Symbol
----------------------------------------------------------
CLOSXP |
BUILTINSXP | Rcpp::Function
SPECIALS...
2001 Feb 17
4
Comments on R-1.2.1 builds (PR#851)
...^
cc-1185 c89: WARNING File = util.c, Line = 358
An enumerated type is mixed with another type.
return (TYPEOF(s) == NILSXP || TYPEOF(s) == ENVSXP);
^
cc-1185 c89: WARNING File = util.c, Line = 364
An enumerated type is mixed with another type.
return TYPEOF(s) == EXPRSXP;
^
cc-1185 c89: WARNING File = util.c, Line = 370
An enumerated type is mixed with another type.
return (s == R_NilValue || TYPEOF(s) == LANGSXP);
^
cc-1185 c89: WARNING File = util.c, Line = 400
An enumerated type is mixed with another type.
return (is...