You can eliminate the loop like this (untested):
cnt <- function(file) {
data <- scan(file, quiet = TRUE)
hist(data, plot = FALSE, breaks = breaks)$counts
}
Reduce("+", sapply(files, cnt))
On Wed, Nov 5, 2008 at 8:01 PM, Andre Nathan <[EMAIL PROTECTED]> wrote:
> Hello
>
> I need to build a his
On 6/11/2008, at 2:01 PM, Andre Nathan wrote:
Hello
I need to build a histogram from data (numbers in the [0,1] interval)
stored in a number of different files. The total amount of data is
very
large, so I can't load everything to memory and then simply call
hist().
Since what I actually n
Hello
I need to build a histogram from data (numbers in the [0,1] interval)
stored in a number of different files. The total amount of data is very
large, so I can't load everything to memory and then simply call hist().
Since what I actually need are the histogram counts, I'm currently doing
it l
3 matches
Mail list logo