Displaying 1 result from an estimated 1 matches for "addhists".
Did you mean:
addbits
2000 Mar 21
0
Summing up histograms and misc.
...expect from
the files. My strategy is now to read one file, make a histogram
equidistant breaks, store it in an object, read another one, another
histogram, and attempt to add these two, and so on. I failed to find a
simple way of doing this (does it exist?), so I hacked this function up
myself:
addhists <- function(h1, h2)
{
if(length(h1$breaks) >= length(h2$breaks))
{
bl <- h1$breaks
bs <- h2$breaks
cl <- h1$counts
cs <- h2$counts
mi <- h1$mids
} else {
bs <- h1$breaks
bl <- h2$breaks
cs <- h1$counts
cl <- h2$counts
mi...