Learn R Programming

bit (version 4.5.0)

get_length: Get C length of a vector

Description

Gets C length of a vector ignoring any length-methods dispatched by classes

Usage

get_length(x)

Value

integer scalar

Arguments

x

a vector

Details

Queries the vector length using C-macro LENGTH, this can be substantially faster than length(unclass(x))

Examples

Run this code
length(bit(12))
get_length(bit(12))

Run the code above in your browser using DataLab