Displaying 11 results from an estimated 11 matches for "ismatrix".
Did you mean:
imatrix
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 25
1
Small issue with R's C API
Consider the R code:
mat <- matrix(seq(1,20),4,5)
is.matrix(mat) # gives TRUE
is.vector(mat) # gives FALSE
On the other hand, if mat is passed through the .Call interface the
corresponding SEXP (call it smat) satisfies
isMatrix(smat) // TRUE
isVector(smat) // TRUE
Consequently, you cannot distinguish matrices from vectors. Looking
at the dim attribute of a vector doesn't help because this is garbage.
Dominick
2009 Jan 19
1
Floating point excepting when cbind()ing a matrix of grobs (or environments) with a 0-column matrix
library(grid)
e <- rectGrob()
# OR:
# e <- environment()
a <- matrix(list(e), ncol = 1, nrow = 2)
b <- matrix(ncol = 0, nrow = 2)
cbind(a, b)
cbind(a, b)
This reliably crashes R for me.
I realise this is a rather esoteric error condition, but it crops up
for me when creating matrices of grobs to be turned into a ggplot2
plot.
Hadley
--
http://had.co.nz/
2004 Jun 16
1
off topic: C/C++ codes for pseudo inverse
Hi,
I am looking for C/C++ codes for computing generalized
inverse of a matrix. Can anyone help me in this
regard?
Thanks,
Mahbub.
2003 May 21
2
moving onto returning a data.frame?
...returning a
data.frame. I'm trying to start my function so that it takes a data.frame as
an argument and returns a data.frame (post-hocus-pocus).
Here's my function so far...
SEXP testfunction3(
SEXP m_in )
{
int *mdims, n, p, i;
double *mm;
SEXP m_out;
SEXP nms;
if( !isMatrix( m_in ) )
{
error("m_in must be a matrix");
}
mdims = INTEGER( GET_DIM( m_in ) );
n = mdims[0];
p = mdims[1];
PROTECT( m_out = NEW_NUMERIC( p ) );
PROTECT( m_in = AS_NUMERIC( m_in ) );
PROTECT( nms = GET_COLNAMES( GET_DIMNAMES( m_in ) ) );
/* here you...
1999 Nov 23
2
rbind problem (PR#338)
In the new version 0.90.0, rbind won't take a vector and a matrix from me,
but works OK if I coerce the vector to a matrix. The following was run on
a new session (i.e., no prior work), and has been duplicated on 2
machines: an SGI running Irix 6.5, and an Intel box running Red Hat Linux
6.0.
Either case works fine in version 0.65.1.
> t3 <- c(.5, .5)
> t4 <-
2003 Jun 23
3
FW: S4 classes, creating in C
.../Conferences/DSC-2003/Tutorials/RExtensions/slide
s.pdf>
http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slides
.pdf
e.g.
SEXP La_DGE_dc(SEXP A)
{
SEXP aa = PROTECT(duplicate(A));
SEXP adims, pivot, val;
int m, n, info;
if (!isMatrix(aa) || !isReal(aa)) {
error("A must be a double precision matrix");
}
adims = GET_DIM(aa); m = INTEGER(adims)[0]; n = INTEGER(adims)[1];
pivot = PROTECT(NEW_INTEGER(m < n ? m : n));
F77_CALL(dgetrf)(&m, &n, REAL(aa), &am...
2002 Mar 05
1
Matrix identification bug (PR#1361)
...m this, I modified the R_LapackPP.cc in Matrix package and it
turned out that
is.MMatrix() failed to return true.
Hence
if (checkClass(classes, "Hermitian"))
return new LaSymmMatDouble(x);
is not executed in static LaMatDouble* asLaMatrix(SEXP x). Instead
if (isMatrix(x)) {
return new LaGenMatDouble(x);
}
is used.
After replaced
return new LaGenMatDouble(x);
with
return new LaSymmMatDouble(x);
the result was (PIII Xeon 1GHz RedHat 7.2 Linux))
> system.time(solve.Matrix(Toeplitz(.5^seq(0,999))))
[1] 9.76 0.22 9.97 0.00 0.00...
2001 Sep 27
1
Passing an R matrix to a C program
Hello,
I'm starting to write a C function that gets
a list and a matrix from R. I'm using .Call
because I've undertood that this is recommended
to handle lists (am I wrong?). My problem is that I
can pass the matrix as a vector, but not as a 2D array.
For example, in the following simple C program:
#include <R.h>
#include <Rdefines.h>
SEXP printListElement(SEXP list,
2001 Dec 14
2
colSums in C
Hi, all!
My project today is to write a speedy colSums(), which is a function
available in S-Plus to add the columns of a matrix. Here are 4 ways to do it,
with the time it took (elapsed, best of 3 trials) in both R and S-Plus:
m <- matrix(1, 400, 40000)
x1 <- apply(m, 2, sum) ## R=16.55 S=52.39
x2 <- as.vector(rep(1,nrow(m)) %*% m) ## R= 2.39 S= 8.52
x3 <-
2007 Jun 21
2
segfault during cbind
The following code results in a seg fault.
> sessionInfo()
R version 2.6.0 Under development (unstable) (2007-06-21 r42013)
x86_64-unknown-linux-gnu
locale:
LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics