View source: R/fortify-data-frame-.R
fortify_data_frame.matrix | R Documentation |
This function converts various objects to a data frame.
## S3 method for class 'matrix'
fortify_data_frame(data, lvls = NULL, ..., data_arg = NULL, call = NULL)
## S3 method for class 'DelayedMatrix'
fortify_data_frame(data, ...)
## S3 method for class 'Matrix'
fortify_data_frame(data, ...)
data |
A matrix-like object. |
lvls |
A logical value indicating whether to restore factor levels using
those stored in |
... |
These dots are for future extensions and must be empty. |
data_arg |
The argument name for |
call |
The execution environment where |
Matrix will be transformed into a long-form data frame, where each row represents a unique combination of matrix indices and their corresponding values. The resulting data frame will contain the following columns:
.row_names
and .row_index
: the row names (only applicable when names
exist) and an integer representing the row index of the original matrix.
.column_names
and .column_index
: the column names (only applicable
when names exist) and column index of the original matrix.
value
: the matrix value, returned as a factor if levels are specified or
restored.
Other fortify_data_frame()
methods:
fortify_data_frame.character()
,
fortify_data_frame.default()
,
fortify_data_frame.dendrogram()
,
fortify_data_frame.phylo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.