as.data.frame.dataset_df: Convert a 'dataset_df' to a base 'data.frame'

View source: R/as.data.frame.R

as.data.frame.dataset_dfR Documentation

Convert a dataset_df to a base data.frame

Description

Converts a dataset_df into a plain data.frame. By default this strips semantic metadata (label, unit, concept/definition, namespace) from each column, but this can be controlled via the strip_attributes argument.

Dataset-level metadata remains attached as inert attributes.

Usage

## S3 method for class 'dataset_df'
as.data.frame(
  x,
  ...,
  strip_attributes = TRUE,
  optional = FALSE,
  stringsAsFactors = FALSE
)

Arguments

x

A dataset_df.

...

Passed to base::as.data.frame().

strip_attributes

Logical: should column-level semantic metadata be stripped? Default: TRUE.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional. Note that all of R's base package as.data.frame() methods use optional only for column names treatment, basically with the meaning of data.frame(*, check.names = !optional). See also the make.names argument of the matrix method.

stringsAsFactors

logical: should the character vector be converted to a factor?

Value

A base R data.frame without the dataset_df class.

Examples

data(orange_df)
as.data.frame(orange_df)


dataset documentation built on Nov. 16, 2025, 5:06 p.m.