Learn R Programming

gglogo (version 0.1.5)

fortify: Convert image matrix to a data frame

Description

S3 method to create a data frame from a 3d array.

Usage

fortify(model, data, ...)

# S3 method for default fortify(model, data, ...)

Arguments

model

array as e.g. returned from readJPEG

data

not used by this method

...

not used by this method

Value

data frame

  • x x coordinate in pixels

  • y y coordinate in pixels (usually negative)

  • red number vector in (0,1) describing the amount of red of the pixel in an RGB model

  • green number vector in (0,1) describing the amount of green of the pixel in an RGB model

  • blue number vector in (0,1) describing the amount of blue of the pixel in an RGB model