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

Description Usage Arguments Value Examples

View source: R/fortify_base.R

Description

Different from as.data.frame

Usage

1
2
## S3 method for class '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

1
fortify(matrix(1:6, nrow=2, ncol=3))

Example output

Loading required package: ggplot2
  1 2 3
1 1 3 5
2 2 4 6

ggfortify documentation built on May 26, 2018, 5:04 p.m.