Learn R Programming

bit64 (version 4.6.0-1)

is.sorted.integer64: Small cache access methods

Description

These methods are packaged here for methods in packages bit64 and ff.

Usage

# S3 method for integer64
na.count(x, ...)

# S3 method for integer64 nvalid(x, ...)

# S3 method for integer64 is.sorted(x, ...)

# S3 method for integer64 nunique(x, ...)

# S3 method for integer64 nties(x, ...)

Value

is.sorted returns a logical scalar, the other methods return an integer scalar.

Arguments

x

some object

...

ignored

Functions

  • na.count(integer64): returns the number of NAs

  • nvalid(integer64): returns the number of valid data points, usually length() minus na.count.

  • is.sorted(integer64): checks for sortedness of x (NAs sorted first)

  • nunique(integer64): returns the number of unique values

  • nties(integer64): returns the number of tied values.

Details

All these functions benefit from a sortcache(), ordercache() or sortordercache(). na.count(), nvalid() and nunique() also benefit from a hashcache().

See Also

cache() for caching functions and sortordercache() for functions creating big caches

Examples

Run this code
 x <- as.integer64(sample(c(rep(NA, 9), 1:9), 32, TRUE))
 length(x)
 na.count(x)
 nvalid(x)
 nunique(x)
 nties(x)
 table.integer64(x)
 x

Run the code above in your browser using DataLab