HI Eliza,
You could do this:
set.seed(15)
mat1<-matrix(sample(1:800,124*12,replace=TRUE),nrow=12) # smaller dataset
#Your codes
list1<-list()
for(i in 1:ncol(mat1)){
list1[[i]]<-t(apply(mat1,1,function(x) x[i]-x))
list1}
x<-list1
x<-matrix(unlist(x),nrow=12)
x<-abs(x)
y<-colSums(x, na.r
Dear Arun,thankyou very much...
> Date: Thu, 10 Jan 2013 12:02:31 -0800
> From: smartpink...@yahoo.com
> Subject: Re: merging command
> To: eliza_bo...@hotmail.com
> CC: r-help@r-project.org
>
> HI Eliza,
>
> You could do this:
> set.seed(15)
> mat1<-matrix(sample(1:800,124*12,replace=TRUE),nro
2 matches
Mail list logo