Coerce an existing data structure into a tbl_cube
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | as.tbl_cube(x, ...)
## S3 method for class 'array'
as.tbl_cube(x, dim_names = names(dimnames(x)),
met_name = deparse(substitute(x)), ...)
## S3 method for class 'table'
as.tbl_cube(x, dim_names = names(dimnames(x)),
met_name = "Freq", ...)
## S3 method for class 'matrix'
as.tbl_cube(x, dim_names = names(dimnames(x)),
met_name = deparse(substitute(x)), ...)
## S3 method for class 'data.frame'
as.tbl_cube(x, dim_names = NULL,
met_name = guess_met(x), ...)
|
x |
an object to convert. Built in methods will convert arrays, tables and data frames. |
... |
Passed on to individual methods; otherwise ignored. |
dim_names |
names of the dimesions. Defaults to the names of |
met_name |
a string to use as the name for the measure
the |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.