fortify: Convert image matrix to a data frame

View source: R/text.r

fortifyR Documentation

Convert image matrix to a data frame

Description

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

Usage

fortify(model, data, ...)

## Default S3 method:
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


heike/gglogo documentation built on Feb. 3, 2024, 1:45 p.m.