ggfortify (version 0.4.7)

fortify.matrix: Convert base::matrix to data.frame

Description

Different from as.data.frame

Usage

# S3 method for matrix
fortify(model, data = NULL, compat = FALSE, ...)

Arguments

model

base::matrix instance

data

original dataset, if needed

compat

Logical frag to specify the behaviour when converting matrix which has no column name. If FALSE, result has character columns like c('1', '2', ...). If TRUE, result has character columns like c('V1', 'V2', ...).

...

other arguments passed to methods

Value

data.frame

Examples

Run this code
# NOT RUN {
fortify(matrix(1:6, nrow=2, ncol=3))
# }

Run the code above in your browser using DataCamp Workspace