image_dataframe: Creates a color response map based on columnar data.

Description Usage Arguments Details Examples

Description

Creates a color response map based on columnar data, not a matrix as used by R's image function. It is used in cases where a full matrix of responses, over a complete grid, is not available. Data are submitted as a table with x and y coordinates, and a response z at each.

The points are mapped on an x-y plot, then colored according to the value of z. One typical use would be where soil data are available at many locations, coloring points by the concentration of one nutrient. Another, illustrated below, would be to color tree locations according to dbh.

Usage

1
2
3
4
5
image_dataframe(data, xcol = "x", ycol = "y", zcol = "z",
  breaks = NULL, div = NULL, colors = NULL, xname = "x",
  yname = "y", xrange = NULL, yrange = NULL, ptsize = 1,
  graphfile = NULL, export = X11, newgraph = FALSE, h = 11,
  w = 11, plotsize = 6)

Arguments

data

A data frame with at least 3 columns, 2 of which are coordinates and one a numerical response at those coordinates

xcol, ycol, zcol

These allow the columns of data to carry non-standard names

breaks

if set, a vector of breaks for the image colors and the contour lines; if NULL, levels controls the breaks

xname

axis names

yname

axis names

xrange, yrange

Minimum and maximum x and y coordinates of area graphed. If NULL, all x (or y) are included.

ptsize

Passed to argument cex in graphics::par().

graphfile

the file name if export is pdf, png, jpeg, win.metafile, etc.

export

if newgraph = TRUE, this defines the graphics device; options include X11, quartz, win.graph, win.metafile, png, bmp, jpeg, pdf (not quoted!)

newgraph

if FALSE, just graph to the screen and export is ignored; use TRUE to create a new plot window or export to a file.

h

height and width of graph window in units which depend on the export device chosen (some are pixels, some are inches); ignored if newgraph = FALSE.

w

height and width of graph window in units which depend on the export device chosen (some are pixels, some are inches); ignored if newgraph = FALSE.

plotsize

size of graph's x-dimension in inches; ignored if newgraph=FALSE

Details

Other arguments are the same as imageGraph().

Name image.dataframe clashed with an S3 method, so it was replaced by image_dataframe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
CTFSplot('bci',6,'full')

image_dataframe(
  data = subset(bciex::bci12t6mini, status == 'A'),
  xcol = 'gx',
  ycol = 'gy',
  zcol = 'dbh',
  breaks = c(10, 20, 50, 100, 500, 10000),
  xrange = c(0, 100),
  yrange = c(0, 100),
  colors = c('orange', 'yellow', 'lightgreen', 'green', 'blue'),
  newgraph = TRUE,
  h = 9,
  w = 12,
  plotsize = 7
)
## End(Not run)

forestgeo/ctfs documentation built on May 3, 2019, 6:44 p.m.