contourLinesR {contoureR}  R Documentation 
A wrapper to the getContourLines
function, provided to ease the transition from
the contourLines
function as part of grDevices
contourLinesR(x, y, z, nlevels = 10, levels = pretty(range(z, na.rm = TRUE)), ...)
x 
Numeric data for x and y coordinate, a single matrix or dataframe object can be provided for

y 
Numeric data for x and y coordinate, a single matrix or dataframe object can be provided for

z 
numeric Data for z coordinate (the coordinate to model) 
nlevels 
An integer number of bins to split the data into iff 
levels 
A numeric vector of the explicitly specified levels (z values) to contour, by specifying this argument,
it will override 
... 
any other parameters passed through to 
This function returns data in the same format/structure as contourLines
,
ie, list of lists, which is different from the (preferred) dataframe
object returned
by the getContourLines
function as part of the present work.
A list of contours is returned, Each contour is a list with the elements:

The contour of the level 

The xcoordinates of the contour 

The ycoordinates of the contour 
library(contoureR) library(ggplot2) x = runif(100) y = runif(100) df = expand.grid(x=x,y=y) z = with(df,x+y) result = contourLinesR(df$x,df$y,z)