as.table.tbl_cube: Coerce a 'tbl_cube' to other data structures

View source: R/cube.R

as.table.tbl_cubeR Documentation

Coerce a tbl_cube to other data structures

Description

Supports conversion to tables, data frames, tibbles.

For a cube, the data frame returned by tibble::as_tibble() resulting data frame contains the dimensions as character values (and not as factors).

Usage

## S3 method for class 'tbl_cube'
as.table(x, ..., measure = 1L)

## S3 method for class 'tbl_cube'
as.data.frame(x, ...)

## S3 method for class 'tbl_cube'
as_tibble(x, ...)

Arguments

x

a tbl_cube

...

Passed on to individual methods; otherwise ignored.

measure

A measure name or index, default: the first measure

Value

A table, data frame, or tibble, as appropriate.


cubelyr documentation built on Nov. 10, 2022, 6:09 p.m.