Excellent Arun, it worked, many thanks.
E.
On Thu, Mar 27, 2014 at 11:55 AM, arun wrote:
> HI Elio,
>
> May be this helps:
> indx <- order(gsub("\\d+","",colnames(res)))
> res1 <- res[indx,indx]
> A.K.
>
>
>
>
>
>
>
> On Thursday, March 27, 2014 6:24 AM, Elio Shijaku
> wrote:
>
> Hi Arun,
>
HI Elio,
May be this helps:
indx <- order(gsub("\\d+","",colnames(res)))
res1 <- res[indx,indx]
A.K.
On Thursday, March 27, 2014 6:24 AM, Elio Shijaku wrote:
Hi Arun,
Thanks a lot for your continuous help. I am attaching a sample with the row /
column names. Basically, the order should
Hi Elio,
I guess the error is here:
as.vector(sapply(lst2,rownames)) #still a list
length(unique(as.vector(sapply(lst2,rownames))) )# length of list
#22
uNrownames <- unique(unlist(sapply(lst2,rownames)))
length(uNrownames)
#[1] 90
res <-
matrix(0,nrow=length(uNrownames),ncol=length(uN
Hi Arun,
Yes, that last command m1[indx2N] <- m2[sort(indx1)] did exactly the trick,
now the variable and their values are perfectly matched. Thanks a lot for
your great help.
Best,
Elio
On Wed, Mar 5, 2014 at 1:17 AM, arun wrote:
>
>
> Hi Elio,
>
> If you change the last line of the code:
>
Hi Elio,
If you change the last line of the code:
m1[indx2N] <- m2[indx1]
to
m1[indx2N] <- m2[sort(indx1)]
sum(m1[rownames(m1)=="p79",])
#[1] 191
sum(m2[rownames(m2)=="p79",])
#[1] 191
The problem is in the order of the colnames/rownames in each of the datasets.
I tested it on something
5 matches
Mail list logo