vector_dc {dotCall64}R Documentation

Allocate vectors in .C64()

Description

Helper functions to be used in calls to .C64. The function vector_dc and its shortcuts numeric_dc and integer_dc return a R object of class c("vector_dc", "list") containing the necessary information (type and length) to allocate the vector (initialized with 0) inside the call to .C64. 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 to allocate.

length

Numeric vector of length 1. Length of the vector to allocate.

Value

Object of class vector_dc and list.

Examples

vector_dc("integer", 20)

[Package dotCall64 version 0.9-04 Index]