Skip to contents

This is a utility function that accesses the DATAPTR of a vector, but doesn't touch it or do anything else. The DATAPTR is a pointer to the actual array data of the vector. This is useful because it often triggers certain behaviours in ALTREP vectors like expanding them into full form.

Usage

alt_touch_dataptr(x)

Arguments

x

Any R object

Value

x, invisibly, unchanged.

Examples

x <- 1:5
compact_is_expanded(x)
#> [1] FALSE
alt_touch_dataptr(x)
compact_is_expanded(x)
#> [1] TRUE