R: Fast squared summing in different bins

binned_sumsq {ffbase} | R Documentation

## Fast squared summing in different bins

### Description

`binned_sum` implements fast squared summing for given bins by calling c-code, which can be used to calculate variance and standard deviation Please note that incorrect use of this function may crash your R-session. the values of `bins` must be in between 1:`nbins` and `bin` may not contain `NA`

### Usage

    binned_sumsq(x, mean = rep(0, nbins), bin, nbins = max(bin), ...)

    ## Default S3 method:
    binned_sumsq(x, mean = rep(0, nbins), bin, nbins = max(bin), ...)

    ## S3 method for class 'ff'
    binned_sumsq(x, mean = rep(0, nbins), bin, nbins = max(bin), ...)

### Arguments

`x` | `numeric` vector with the data to be summed squared
`mean` | `numeric` vector with an optional mean to be subtracted from the data to be summed and squared
`bin` | `integer` vector with the bin number for each observation
`nbins` | `integer` maximum bin number
`...` | will be passed on to the implementation.

### Value

`numeric` matrix where each row is a bin

`numeric` matrix where each row is a bin

`numeric` matrix where each row is a bin

[Package ffbase version 0.13.1 Index]