Learn R Programming

broom (version 0.4.5)

xyz_tidiers: Tidiers for x, y, z lists suitable for persp, image, etc.

Description

Tidies lists with components x, y (vector of coordinates) and z (matrix of values) which are typically used by functions such as persp or image and returned by interpolation functions such as interp.

Usage

tidy_xyz(x, ...)

Arguments

x

list with components x, y and z

...

extra arguments

Value

All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.

tidy returns a data frame with columns x, y and z and one row per value in matrix z.

Examples

Run this code
# NOT RUN {
A <- list(x=1:5, y=1:3, z=matrix(runif(5*3), nrow=5))
image(A)
tidy(A)

# }

Run the code above in your browser using DataLab