Displaying 20 results from an estimated 26 matches for "cplxsxp".
Did you mean:
closxp
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...ISTSXP 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
BCODESXP EXTPTRSXP WEAKREFSXP
0 93 0
> memory.size(max = TRUE)
[1] 224669696
> memory.size(max = FALSE)
[1] 81072656
> att...
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
...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:
used (Mb) gc trigger (Mb)
Ncells 347539...
2016 May 05
1
Too many spaces in deparsed complex numbers with digits17 control option
...ssary space in the representation of complex numbers.
> deparse(0 + 0i)
[1] "0+0i"
> deparse(0 + 0i, control = "digits17")
[1] "0 + 0i"
As far as I can tell, the logic for this comes from this piece of
/src/main/deparse.c:
if (TYPEOF(vector) == CPLXSXP && (d->opts & DIGITS16)) {
Rcomplex z = COMPLEX(vector)[i];
if (R_FINITE(z.r) && R_FINITE(z.i)) {
snprintf(hex, 64, "%.17g + %17gi", z.r, z.i);
strp = hex;
} else
strp = EncodeElement(vector, i, quote, '.');
}
I think this is a smal...
2019 Jan 21
0
orderVector1 (sort.c): Tiny improvement concerning nalast
...se LGLSXP:
case INTSXP:
! for (i = 0; i < n; i++) isna[i] = (ix[i] == NA_INTEGER);
! break;
case REALSXP:
! for (i = 0; i < n; i++) isna[i] = ISNAN(x[i]);
! break;
case STRSXP:
! for (i = 0; i < n; i++) isna[i] = (sx[i] == NA_STRING);
! break;
case CPLXSXP:
! for (i = 0; i < n; i++) isna[i] = ISNAN(cx[i].r) || ISNAN(cx[i].i);
! break;
default:
! UNIMPLEMENTED_TYPE("orderVector1", key);
}
! for (i = 0; i < n; i++) numna += isna[i];
if(numna)
switch (TYPEOF(key)) {
--- 1079,1111 ----
switch (TYPEOF(...
2013 Apr 09
2
Behaviors of diag() with character vector in R 3.0.0
Dear all,
According to CHANGES IN R 3.0.0:
o diag() as used to generate a diagonal matrix has been re-written
in C for speed and less memory usage. It now forces the result
to be numeric in the case diag(x) since it is said to have 'zero
off-diagonal entries'.
diag(x) does not work for character vector in R 3.0.0 any more. For example,
v <- c("a",
2010 Sep 08
0
Correction to vec-subset speed patch
...i != NA_INTEGER)
- INTEGER(result)[i] = INTEGER(x)[ii];
- else
- INTEGER(result)[i] = NA_INTEGER;
- break;
- case REALSXP:
- if (0 <= ii && ii < nx && ii != NA_INTEGER)
- REAL(result)[i] = REAL(x)[ii];
- else
- REAL(result)[i] = NA_REAL;
- break;
- case CPLXSXP:
- if (0 <= ii && ii < nx && ii != NA_INTEGER) {
- COMPLEX(result)[i] = COMPLEX(x)[ii];
- }
- else {
- COMPLEX(result)[i].r = NA_REAL;
- COMPLEX(result)[i].i = NA_REAL;
- }
- break;
- case STRSXP:
- if (0 <= ii && ii < nx && ii...
2010 Aug 26
2
Speeding up transpose
...= 1, j += nrow) {
if (j>=len) j -= (len-1);
INTEGER(r)[i] = INTEGER(a)[j];
}
case REALSXP:
for (i = 0, j = 0; i<len; i += 1, j += nrow) {
if (j>=len) j -= (len-1);
REAL(r)[i] = REAL(a)[j];
}
break;
case CPLXSXP:
for (i = 0, j = 0; i<len; i += 1, j += nrow) {
if (j>=len) j -= (len-1);
COMPLEX(r)[i] = COMPLEX(a)[j];
}
break;
case STRSXP:
for (i = 0, j = 0; i<len; i += 1, j += nrow) {
if (j>=len) j -= (len-1);
SET...
2005 Jan 03
2
Memory problem ... Again
...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 EXTPTRSXP WEAKREFSXP
0 106 0
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
_
2004 Dec 28
2
Configuration of memory usage
...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 EXTPTRSXP WEAKREFSXP
0 106 0
Although I have no idea of memory allocation in R, apparently something's
wrong with this. The m...
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
...REAL(b)[i * nrows + j] = REAL(a)[i * nrows + j];
}
SEXP do_matexp(SEXP call, SEXP op, SEXP args, SEXP rho)
{
int nrows, ncols;
SEXP matrix, tmp, dims, dims2;
SEXP x, y, x_, x__;
int i,j,e,mode;
// Still need to fix full complex support
mode = isComplex(CAR(args)) ? CPLXSXP : REALSXP;
SETCAR(args, coerceVector(CAR(args), mode));
x = CAR(args);
y = CADR(args);
dims = getAttrib(x, R_DimSymbol);
nrows = INTEGER(dims)[0];
ncols = INTEGER(dims)[1];
if (nrows != ncols)
error(_("can only raise square matrix to power"));...
2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so?
Best
S??ren
2008 Apr 06
0
manual 'Writing R Extensions': bug in example
...<unnamed>";
19 switch(TYPEOF(CAR(args))) {
20 case REALSXP:
21 Rprintf("[%d] '%s' %f\n", i+1, name, REAL(CAR(args))[0]);
22 break;
23 case LGLSXP:
24 case INTSXP:
25 Rprintf("[%d] '%s' %d\n", i+1, name, INTEGER(CAR(args))[0]);
26 break;
27 case CPLXSXP:
28 cpl = COMPLEX(CAR(args))[0];
29 Rprintf("[%d] '%s' %f + %fi\n", i+1, name, cpl.r, cpl.i);
30 break;
31 case STRSXP:
32 Rprintf("[%d] '%s' %s\n", i+1, name,
33 CHAR(STRING_ELT(CAR(args), 0)));
34 break;
35 default:
36 Rprintf("[%d] '%s...
2006 Jan 27
1
rbind/cbind unimplemented for raw (RAWSXP) types. (PR#8529)
Full_Name: Hin-Tak Leung
Version: R 2.2.1
OS: x86_64-redhat-linux-gnu
Submission from: (NULL) (131.111.186.92)
rbind/cbind is unimplemented for raw (RAWSXP) types.
I have a working patch implementing the functionality,
to follow.
--please do not edit the information below--
Version:
platform = x86_64-redhat-linux-gnu
arch = x86_64
os = linux-gnu
system = x86_64, linux-gnu
status =
major
2005 Oct 24
2
R_MakeExternalPtr
Hi,
I'm using R_MakeExternalPtr() to store handles to (COM) objects in a SEXP.
The code basically is
sexp = R_MakeExternalPtr(handle,R_NilValue,R_NilValue);
R_RegisterCFinalizerEx(...);
After creating the sexp, LENGTH(sexp) returns some quite large integer
value. It seems like an "unitialized" value.
Can I safely assume, that an SEXP of type EXTPTRSXP can only contain a
single
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
1998 Apr 02
1
attributes now inherited
...)
{
SEXP s, t;
**************************************************************************
*** complex.c Wed Sep 17 22:37:02 1997
--- /net/aster/R/src/main/complex.c Wed Apr 1 16:33:28 1998
***************
*** 104,109 ****
--- 104,121 ----
PROTECT(s1);
PROTECT(s2);
ans = allocVector(CPLXSXP, n);
+
+ /* copy attributes from longest argument */
+ if (n1 > n2)
+ copyMostAttrib(s1, ans);
+ else if (n1 == n2) {
+ copyMostAttrib(s2, ans);
+ copyMostAttrib(s1, ans);
+ }
+ else
+ copyMostAttrib(...
2002 Aug 06
2
Memory leak in R v1.5.1?
...MSXP 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
EXTPTRSXP WEAKREFSXP
0 0 0
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list...
2013 Oct 12
1
[PATCH] minor suggestions for R-ints manual
...64048)
+++ trunk/doc/manual/R-ints.texi (working copy)
@@ -462,7 +462,7 @@
(which are 32 bits on all @R{} platforms).
@item REALSXP
- at code{length}, @code{truelength} followed by a block of C @code{double}s
+ at code{length}, @code{truelength} followed by a block of C @code{double}s.
@item CPLXSXP
@code{length}, @code{truelength} followed by a block of C99 @code{double
@@ -1330,7 +1330,7 @@
The relationship between the pairs is similar: @code{warning} tries to
fathom out a suitable call, and then calls @code{warningcall} with that
call as the first argument if it succeeds, and with @code...