as_tibble.dataset_df: Coerce a 'dataset_df' to a tibble

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

as_tibble.dataset_dfR Documentation

Coerce a dataset_df to a tibble

Description

as_tibble() method for dataset_df objects.

Converts a dataset_df into a tibble. By default, additional metadata attached to the object is removed unless strip_attributes = FALSE is specified.

Usage

as_tibble(x, ...)

## S3 method for class 'dataset_df'
as_tibble(x, ..., strip_attributes = TRUE, .name_repair = "check_unique")

as.tibble.dataset_df(
  x,
  ...,
  strip_attributes = TRUE,
  .name_repair = "check_unique"
)

Arguments

x

A dataset_df object.

...

Additional arguments passed to as.data.frame.dataset_df().

strip_attributes

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

.name_repair

Treatment of problematic column names:

  • "minimal": No name checks.

  • "unique": Enforce uniqueness.

  • "check_unique": (default) require unique names.

  • "universal": Make unique and syntactic.

  • A function or purrr-style anonymous function, see rlang::as_function().

Value

A tibble containing the data (and optionally some attributes) of the dataset_df.

Metadata handling

The strip_attributes argument controls which attributes of the dataset_df object are preserved. When strip_attributes = TRUE (the default), only column-level information is kept.

About column names

The dataset_df class may internally use reserved names for indexing, identifiers, or metadata. These are never exposed in the resulting tibble. Column names in the output tibble may be repaired according to .name_repair.

See Also

  • tibble::as_tibble()

  • as.data.frame.dataset_df()

Examples

# Convert a dataset_df to a tibble
x <- dataset_df(orange_df)
as_tibble(x)

# Keep attributes
as_tibble(x, strip_attributes = FALSE)


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