On Oct 14, 2009, at 12:58 AM, Stephen Samaha wrote:
Hello, I would like to use mapply to avoid using a loop but for some
reason, I can't seem to get it to work. I've included copies of my
code below. The first set of code uses a loop (and it works fine),
and the second set of code attempts
Hello, I would like to use mapply to avoid using a loop but for some reason, I
can't seem to get it to work. I've included copies of my code below. The first
set of code uses a loop (and it works fine), and the second set of code
attempts to use mapply but I get a "subscript out of bounds" error
Yes, that's it. Thank you again!
Dimitris Rizopoulos wrote:
>
> do you mean the following?:
>
> out <- rowMeans(matrix(unlist(res), ncol = length(res)))
> dim(out) <- dim(res[[1]])
> out
>
>
> Best,
> Dimitris
>
>
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School
do you mean the following?:
out <- rowMeans(matrix(unlist(res), ncol = length(res)))
dim(out) <- dim(res[[1]])
out
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel:
useR's,
This is a follow up question to one I previously asked. Consider the
3-element list below
> res
[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] NA NA NA 1.25 0.25 0.75 NA NA NANANANA 1.25
0.25
[2,] 1.25 0.25 0.7
5 matches
Mail list logo