I thought you want to compare between the rows of two columns even if their
corresponding values fall in the same row.
fun3<- function(mat){
indmat<-combn(seq_len(ncol(mat)),2)
lst1<- lapply(seq_len(ncol(indmat)),function(i) {mat[,indmat[,i]]})
names(lst1)<-as.character(inter
Thanks Arun,
i could never have done this on my own
the recent reply will make it easier 4 me to understand..
thanks onceagain..
enjoy your weekend
:D
Elisa
> Date: Sat, 25 May 2013 18:35:27 -0700
> From: smartpink...@yahoo.com
> Subject: Re: QA
> To: eliza_bo...@hotmail.com
> CC: r-help@r-project
Hi,
I hope this works for you.
fun1<- function(x){
big<- x>0.8*max(x)
n<- length(big)
startRunOfBigs<- which(c(big[1],!big[-n] & big[-1]))
endRunOfBigs<- which(c(big[-n] & !big[-1], big[n]))
index<- vapply(seq_along(startRunOfBigs),function(i)
which.max(x[startRunOfBigs[i]:end
3 matches
Mail list logo