vector_dc: Allocate vectors in .C64()

View source: R/vector_dc.R

vector_dcR Documentation

Allocate vectors in .C64()

Description

vector_dc and its shortcuts numeric_dc and integer_dc are helper functions used in calls to .C64. They return an R object of class c("vector_dc", "list"), which contains information on the type and length of the vector to allocate. Using vector_dc together with INTENT = "w" argument of .C64 leads to performance gains by avoiding unnecessary castings and copies.

Usage

vector_dc(mode = "logical", length = 0L)

numeric_dc(length = 0)

integer_dc(length = 0)

Arguments

mode

character vector of length 1. Storage mode of the vector.

length

numeric vector of length 1. Length of the vector.

Value

object of class vector_dc and list.

Examples

vector_dc("integer", 20)

dotCall64 documentation built on Oct. 17, 2023, 5:07 p.m.