[R] Handling two lists of matrices

Bornman, Daniel M bornmand at BATTELLE.ORG
Tue Oct 9 19:34:01 CEST 2007


I'm having trouble setting up the function call to handle two lists of
matrices.  Each list has 6 matrices - Each matrix is 20x10.  I need to
do some basic math on corresponding matrices in each list.

Here are some outputs of these lists, etc...

# first list
> length(qc.pm)
[1] 6
> dim(qc.pm[[1]])
[1] 20 10
> qc.pm[[1]][1:4,1:4]
       441-JP071707.CEL 442-JP071707.CEL 443-JP071707.CEL
444-JP071707.CEL
495086            11923             9209             7980
10088
31276              6883             5577             3985
5561
6479               4730             3700             2170
4772
673616             9495             8015             5252
8178


# second list
> length(qc.mm)
[1] 6
> dim(qc.mm[[1]])
[1] 20 10
> qc.pm[[1]][1:4,1:4]
       441-JP071707.CEL 442-JP071707.CEL 443-JP071707.CEL
444-JP071707.CEL
495086            11923             9209             7980
10088
31276              6883             5577             3985
5561
6479               4730             3700             2170
4772
673616             9495             8015             5252
8178


I'm having trouble passing 2 args to a function call to use the lapply()
method.  Any suggestion would be appreciated.


Thanks,

Daniel Bornman
Researcher
Battelle Memorial Institute
505 King Ave
Columbus, OH 43201
614.424.3229



More information about the R-help mailing list