approxCountDistinct {SparkR}R Documentation

Returns the approximate number of distinct items in a group

Description

Returns the approximate number of distinct items in a group. This is a column aggregate function.

Usage

## S4 method for signature 'Column'
approxCountDistinct(x, rsd = 0.05)

## S4 method for signature 'Column'
approxCountDistinct(x, rsd = 0.05)

approxCountDistinct(x, ...)

Arguments

x

Column to compute on.

rsd

maximum estimation error allowed (default = 0.05)

...

further arguments to be passed to or from other methods.

Value

the approximate number of distinct items in a group.

Note

approxCountDistinct(Column) since 1.4.0

approxCountDistinct(Column, numeric) since 1.4.0

Examples

## Not run: approxCountDistinct(df$c)
## Not run: approxCountDistinct(df$c, 0.02)

[Package SparkR version 2.0.2 Index]