search for: somematrix

Displaying 4 results from an estimated 4 matches for "somematrix".

2016 Nov 26
0
methods:::.selectSuperClasses and byte compilation
Dear R-devel list, Running the following example on a recent R-devel (here, 2016-11-22 r71672) shows that the byte compiler can cause some significant performance drops (here, computation time increasing from 0.01s to 0.31s ...) ================================= library(Matrix) someMatrix <- new("dtCMatrix", i= c(1L, 0:3), p=c(0L,0L,0:2, 5L), Dim = c(5L, 5L), x = rep(1, 5), diag = "U") compiler::enableJIT(3) ## R-devel default system.time(replicate(100,Matrix::crossprod(someMatrix))) ## slow ! compiler::enableJIT(0) system.time(replicate(10...
2008 Apr 09
3
permutation/randomization
Hello, I have what I suspect might be an easy problem but I am new to R and stumped. I have a data set that looks something like this b<-c(2,3,4,5,6,7,8,9) x<-c(2,3,4,5,6,7,8,9) y<-c(9,8,7,6,5,4,3,2) z<-c(9,8,7,6,1,2,3,4) data<-cbind(x,y,z) row.names(data)<-c('a','b','c','d','e','f','g','h') which gives: x y z
2007 Jun 22
2
Data consistency checks in functions
Dear friends, I'm writing a function with three arguments myfun <- function(theta, X, values) { .... .... } in this function, I'm trying to write consistency checks. In order to compute the statistic of interest I only need theta and values. The idea of having X in there is that, if values is not provided by the user, then values is computed from X. my problem is I'm trying to
2007 Jun 24
2
matlab/gauss code in R
...gt; There are two ways to pass arguments to functions in R: as named > arguments or by position*. > > Users *can* supply arguments that are inconsistent with the order that > you specify in the function definition, but only if they are used as > named arguments: > > myfun(X = someMatrix, values = aVector, theta = whatever) > > If the arguments are passed by position (as in myfun(beta, val1)), R > will assume that the first argument is theta, the second is X, etc since > that is how the function is defined. > > My suggestion would be to leave these arguments witho...