Skip to content

correction needed in codes

7 messages · Eliza Botto, Rui Barradas

#
Hello,

Can't you simply lapply(b, lines, lwd = 2) ?

Hope this helps,

Rui Barradas

Em 23-12-2012 02:19, eliza botto escreveu:
#
Hello,

How about


fun <- function(i){
     matplot(res[[i]][,-1], type="l",col="grey")
     lines(b[[i]], lwd = 2, col = "black")
}
for (i in seq(1)){
     a <- lapply(seq_along(res), function(x) res[[x]][,-1])
     b <- lapply(seq_along(a), function(a) 
matrix(rowMeans(res[[a]]),ncol=1))
     lapply(seq_along(res), fun)
}


Hope this helps,

Rui Barradas
Em 23-12-2012 16:16, eliza botto escreveu:
#
Merry christmas.

Rui Barradas
Em 23-12-2012 16:41, eliza botto escreveu: