new_data_frame

0th

Percentile

Data frame class

A data.frame data.frame() is a list with "row.names" attribute. Each element of the list must be named, and of the same length. These functions help the base data.frame classes fit in to the vctrs type system by providing constructors, coercion functions, and casting functions.

Keywords
internal
Usage
new_data_frame(x = list(), n = NULL, ..., class = character())

# S3 method for data.frame vec_type2(x, y)

# S3 method for data.frame vec_cast(x, to)

Arguments
x

A named list of equal-length vectors. The lengths are not checked; it is responsibility of the caller to make sure they are equal.

n

Number of rows. If NULL, will be computed from the length of the first element of x.

..., class

Additional arguments for creating subclasses.

Aliases
  • new_data_frame
  • vec_type2.data.frame
  • vec_cast.data.frame
Examples
# NOT RUN {
new_data_frame(list(x = 1:10, y = 10:1))
# }
Documentation reproduced from package vctrs, version 0.1.0, License: GPL-3

Community examples

Looks like there are no examples yet.