Muhammad Azam wrote:
Thanks for the effort but still we are far from the desired result. May be this
example will help you to understand the situation. Example
a1=c(1:12); a1=array(a1,dim=c(3,4)); a2=c(1:12); a2=array(a2,dim=c(3,4));
a3=c(1:16)
a3=array(a3,dim=c(4,4));
a=list(a1,a2,a3);
mad Azam <[EMAIL PROTECTED]>
Cc: R Help
Sent: Thursday, September 11, 2008 9:53:40 AM
Subject: Re: [R] request: most repeated component of a list
That is indeed different from what I thought the first time.
x <- sapply(1:length(l), function(x) {
sum(sapply(l, function(y) {
if ( nrow(
Thanks a lot for this effort.
- Original Message
From: Dimitris Rizopoulos <[EMAIL PROTECTED]>
To: Muhammad Azam <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]; R Help
Sent: Thursday, September 11, 2008 10:52:16 AM
Subject: Re: [R] request: most repeated component of a l
ed is
>>
>> [,1] [,2] [,3] [,4] [,5]
>> [1,]40000
>> [2,]43400
>> [3,]43400
>> [4,]43 00 0Please help to find it. Thanks and
>>
>> best regards
>> Muhammad Azam
&
Subject: Re: [R] request: most repeated component of a list
That is indeed different from what I thought the first time.
x <- sapply(1:length(l), function(x) {
sum(sapply(l, function(y) {
if ( nrow(l[[x]]) != nrow(y) | ncol(l[[x]]) != ncol(y) ) FALSE
else sum(y != l[[x]]) == 0
ECTED]>; R Help
Sent: Wednesday, September 10, 2008 5:59:28 PM
Subject: Re: [R] request: most repeated component of a list
If want you want is the summary from all of them, then 'rbind' the
data together into one matrix and analyze it:
totalMat <- do.call(rbind, listOfMatric
Azam
- Original Message
From: jim holtman <[EMAIL PROTECTED]>
To: Muhammad Azam <[EMAIL PROTECTED]>
Cc: R-help request <[EMAIL PROTECTED]>; R Help
Sent: Wednesday, September 10, 2008 5:59:28 PM
Subject: Re: [R] request: most repeated component of a list
If want you w
You might try
apply(t(sapply(l,apply,2,sum)),2,sum)
--Adam
On Wed, 10 Sep 2008, Muhammad Azam wrote:
Dear R community
I have stored the results of arrays in a list consist of J-components (say
200 components). Each component containing same no of columns but may be
different no of rows. e.
If want you want is the summary from all of them, then 'rbind' the
data together into one matrix and analyze it:
totalMat <- do.call(rbind, listOfMatrices)
On Wed, Sep 10, 2008 at 11:49 AM, Muhammad Azam <[EMAIL PROTECTED]> wrote:
> Dear R community
> I have stored the results of arrays in a list
Dear R community
I have stored the results of arrays in a list consist of J-components (say 200
components). Each component containing same no of columns but may be different
no of rows. e.g
[[1]]
[,1] [,2] [,3] [,4] [,5]
[1,]40000
[2,]43400
[3,
10 matches
Mail list logo