Displaying 2 results from an estimated 2 matches for "nrandom".
Did you mean:
random
2003 Aug 18
0
apply and sort vs vectorized order
...rdering indexes
if (return.sort)
{
A.order<-A[order(A.order,decreasing=decreasing)]
if (row.column==1)
{
dim(A.order)<-dim(t(A))
A.order<-t(A.order)
}
else dim(A.order)<-dim(A)
return(A.order)
}
else return(order(A.order,decreasing=decreasing))
}
# Some system time comparisons
# CHANGE Nrandom ACORDING TO YOUR SYSTEM
Nrandom=1000
A<-matrix(rnorm(Nrandom*Nrandom),nrow=Nrandom,ncol=Nrandom)
A[rbind(c(100,3),c(90,9),c(40,6))]<-NA
system.time({A.r<-order.rc(A)})
system.time(A.s1<-apply(A,1,sort))
system.time({A.c<-order.rc(A,row.column=2)})
system.time(A.s2<-apply(A,2,sort)...
2020 Jan 13
0
Error in R CMD check --as-cran ?
...eally read the block, just notice the multiple calls to
ismat()
??? ismat <- function (x) {
??????? inherits(x, c("matrix", "bdsmatrix", "Matrix"), which=FALSE)
??? }
??? if (missing(varlist) || is.null(varlist)) {
??????? varlist <- vector('list', nrandom)
??????? for (i in 1:nrandom) varlist[[i]] <- coxmeFull() #default
??? }
??? else {
??????? if (is.function(varlist)) varlist <- varlist()
??????? if (inherits(varlist, 'coxmevar')) varlist <- list(varlist)
??????? else if (ismat(varlist))
??????????? varlist <- list(coxm...