out of memory?
From: news_vkhamenya at chat.ru
Date: Thu, 22 Mar 2001 13:24:53 +0300
Hello Brian D. Ripley and r-help,
Thursday, March 22, 2001, 11:49:55 AM, you wrote:
PBDR> Um, a strange use of outer. Try
PBDR> m[m <= 0] <- 0.0001
PBDR> for an efficient solution.
thank you for a good solution, it helps. but what if I need
#--------
outer(1:1000, 1:2, function(r,c) ifelse(m[r,c]<=0, some_f(m[r,c]), m[r,c]) )
#-------
?
P.S. however, "out of virtual memory" stil there... and is not
motivated yet. Maybe it is some kind of bug
No, it is a misuse of R. You do need to learn how to use indexing .... If you ask for thousands of copies of objects, you get them. Please do read the section on BUGS in the FAQ. Not doing what you expect is not a bug .....
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._