vsum {rmr2}R Documentation

Fast small sums

Description

Returns the sum of a list of numeric vectors

Usage

vsum(x)

Arguments

x

Details

Equivalent to sapply(x, sum), it's about 30X faster in some use cases (many small sums). It's often useful in reducers in the vectorized form.

Value

A numeric vector with the sum of each element of the list provided as argument

Note

See collocations.R in the examples directory.

See Also

mapreduce


[Package rmr2 version 3.3.1 Index]