tbl_cubeCoerce an existing data structure into a tbl_cube
as.tbl_cube(x, ...)# S3 method for array
as.tbl_cube(
x,
dim_names = names(dimnames(x)),
met_name = deparse(substitute(x)),
...
)
# S3 method for table
as.tbl_cube(x, dim_names = names(dimnames(x)), met_name = "Freq", ...)
# S3 method for matrix
as.tbl_cube(
x,
dim_names = names(dimnames(x)),
met_name = deparse(substitute(x)),
...
)
# S3 method for data.frame
as.tbl_cube(x, dim_names = NULL, met_name = guess_met(x), ...)
A tbl_cube.
an object to convert. Built in methods will convert arrays, tables and data frames.
Passed on to individual methods; otherwise ignored.
names of the dimensions. Defaults to the names of
the dimnames().
a string to use as the name for the measure.