Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vec_data

Extract underlying data


Description

[Experimental]

Extract the data underlying an S3 vector object, i.e. the underlying (named) atomic vector, data frame, or list.

Usage

vec_data(x)

Arguments

x

A vector or object implementing vec_proxy().

Value

The data underlying x, free from any attributes except the names.

Difference with vec_proxy()

  • vec_data() returns unstructured data. The only attributes preserved are names, dims, and dimnames.

    Currently, due to the underlying memory architecture of R, this creates a full copy of the data for atomic vectors.

  • vec_proxy() may return structured data. This generic is the main customisation point for accessing memory values in vctrs, along with vec_restore().

    Methods must return a vector type. Records and data frames will be processed rowwise.


vctrs

Vector Helpers

v0.3.8
MIT + file LICENSE
Authors
Hadley Wickham [aut], Lionel Henry [aut, cre], Davis Vaughan [aut], data.table team [cph] (Radix sort based on data.table's forder() and their contribution to R's order()), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.