On Tue, Feb 15, 2011 at 09:40:54AM -0800, Alaios wrote:
> Thank you very much for your help again.
> One more question is that after I have that list of matrices what is the 
> easiest way to find the minimun and maximum values of ALL the matrices in 
> that list? 

Try the following.

  # get a list of random matrices 
  rndmat <- function() matrix(runif(4), 2, 2)
  lst <- replicate(4, rndmat(), simplify=FALSE)
 
  # maximum of all components
  max(unlist(lst))

  # vector of the maxima
  sapply(lst, max)

Hope this helps.

Petr Savicky.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to