search for: mmatrix

Displaying 8 results from an estimated 8 matches for "mmatrix".

Did you mean: matrix
2016 May 10
1
recursion problem using do.call(rbind, list(..,<S4>,..))
...ate(n, S, simplify = FALSE) Xb <- do.call("rbind", X) ## -> Error in as(x, "CsparseMatrix") : node stack overflow But as I said, that's not really the Matrix package. A small reproducible example, not involving the Matrix package at all: MM <- setClass("mmatrix", contains="matrix") setMethod("rbind2", signature(x="mmatrix", y="mmatrix"), function(x,y) as(base::rbind(unclass(x), unclass(y)), "mmatrix")) (m5 <- MM(diag(5))) m45 <- MM(matrix(1:20, 4,5)) rbind(m5, m45) # fine ## fin...
2005 Sep 13
3
NUMERIC_POINTER question
Dear R-developers, Using .Call I pass a S4 class with e.g. the following class definition: setClass("mmatrix",representation( data="matrix") ) On the "C side" i do mat = GET_SLOT(vs,install("data")); and then: printf("%f\n",NUMERIC_POINTER(mat)[1]); The above print statement produces the correct output if xx<- new("mmatrix") xx at data<-m...
2016 Sep 10
3
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
...rong. The real challenge here is that I think that if it should "work", it should work so in all cases, e.g., also for c(NA, 3:2, Matrix(2:1), matrix(10:11)) and that's not so easy, e.g., the following class and method definitions do *not* achieve the desired result: ## "mMatrix" is already hidden in Matrix pkg: setClassUnion("mMatrix", members = c("matrix", "Matrix")) setClassUnion("numMatrixLike", members = c("logical", "integer","numeric", "mMatrix")) c.Matrix <- fun...
2016 Sep 10
1
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
...should work so in all cases, e.g., also for >> >> c(NA, 3:2, Matrix(2:1), matrix(10:11)) >> >> and that's not so easy, e.g., the following class and method >> definitions do *not* achieve the desired result: >> >> ## "mMatrix" is already hidden in Matrix pkg: >> setClassUnion("mMatrix", members = c("matrix", "Matrix")) >> setClassUnion("numMatrixLike", members = >> c("logical", "integer","numeric", "mMatrix&quot...
2016 Sep 10
0
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
...I think that if it should "work", > it should work so in all cases, e.g., also for > > c(NA, 3:2, Matrix(2:1), matrix(10:11)) > > and that's not so easy, e.g., the following class and method > definitions do *not* achieve the desired result: > > ## "mMatrix" is already hidden in Matrix pkg: > setClassUnion("mMatrix", members = c("matrix", "Matrix")) > setClassUnion("numMatrixLike", members = > c("logical", "integer","numeric", "mMatrix")) >...
2005 Nov 20
1
use of the 'by' command & converting SPSS ANOVA/GLM syntax into R syntax
...3) /INTERCEPT = INCLUDE /EMMEANS = TABLES(OVERALL) /EMMEANS = TABLES(sex) /PRINT = DESCRIPTIVE ETASQ OPOWER HOMOGENEITY /CRITERIA = ALPHA(.05) /DESIGN = blik sex blik*sex . GLM avmth3fq avfreq BY SEX /WSFACTOR = timex 2 Polynomial /METHOD = SSTYPE (3) /PRINT = DESCRIPTIVE ETASQ TEST(MMATRIX) HOMOGENEITY /CRITERIA = ALPHA (.05) /WSDESIGN = timex /DESIGN = sex . Any assistance with either of these enquiries is most appreciated. Bob
2013 Mar 01
2
using reserved words in R, and reuse variable names in different functions
Hi list, I am writing several functions and running out variable names. I am using words such as "t", "c", "matrix" to keep the notation same as formulas I am using. For example I have, unnormalized <- function(t, x, y){ val <- rnorm(t, mean=x, var=y) return(val) } metropolis <- function(t, c, x, y){ den1 <- unnormalized(t, mean=x, sd=y)
2002 Mar 05
1
Matrix identification bug (PR#1361)
...faster). After using native fortran lapack (call to dpotrf and dpotri returns 9s for PIII Xeon), I realized that R may treat the matrix as a general matrix rather than symmetric except the abnormal case. To confirm 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 replace...