as.data.frame.Cube {hypercube} | R Documentation |
Converts the actual view of a cube to a data frame
Description
Converts the actual view of a Cube
object to a data frame. All added selections and
aggregations will be regarded. Note that selection criteria will be applied before
aggregating the data.
Usage
## S3 method for class 'Cube'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
Arguments
x |
The |
row.names |
A character vector giving the row names for the data frame. |
optional |
Should setting row names and converting column names be optional? |
... |
Further parameters that are passed to |
Value
A molten data frame
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
Examples
data("sales")
cube = generateCube(sales, columns = list(time = c("month", "year"),
location = c("state"), product = "product"), valueColumn = "amount")
cube = change.dimensionOrder(cube, dimensions = c("product", "month", "year", "state"))
df = as.data.frame(cube)
df
[Package hypercube version 0.2.1 Index]