plotFields: Create a field-layout plot from a data frame.

Description Usage Arguments Value Author(s) Examples

Description

Create a field-layout plot from a data frame.

Usage

1
2
3
plotFields(x, column, textColumn = NULL, asFactor = FALSE,
  borderColumns = c("EXPT", "BLOCK"), colorscale = NULL, colors = NULL,
  rows = "ROW", ranges = "RANGE", ...)

Arguments

x

A data frame containing at least the columns column, rows and ranges.

column

Character string specifying the name of the column in x to be used for coloring the different positions in the field. This should be either a factor-column or a numeric column.

textColumn

(Optional) Character string specifying the name of the column in x to be used to print text within the plots

asFactor

Logical indicating whether the specified column should be considered as a factor, even if it is numeric.

borderColumns

(Optional) A chracter vector specifying the factors (maximum of three factors) to be used to draw border columns in the field map. Default = c("EXPT", "BLOCK"). The factors are assumed to be given in nested order, such as c("EXPT", "TRIAL", "BLOCK"), c("EXPT", "BLOCK", "SUBBLOCK") etc. – if only one factor is given, a bold border will be drawn – if two factors are given, a bold border will be drawn for the main factor with regular border for the sub-factor – if three factors are given, a bold border will be drawn for the main factor, regular border will be drawn for the sub-factor and dotted-line border will be drawn for sub-sub-factor

colorscale

(Optional) A numeric vector of length 2 with the range to use the colors over and is applicable only when 'column' is numeric variable. Default is NULL in which case the observed range is computed from the column.

colors

Charachter vector speciyfing the colors to be used for the different levels in column. Default = NULL in which case pre-specified colors are used.

rows

Character string specifying the column name with the ROW-coordinates in x.

ranges

Character string specifying the column name with the RANGE-coordinates in x.

...

Extra graphical parameters for the levelplot-function.

Value

Plot is submitted to the graphical device.

Author(s)

Ruud Derijcker, Katrien Baert, Bert Lataire

Examples

1
2
3
4
5
6
7
data(exampleCV)
exampleCV$CHECK <- sample(c(rep(0, 80),
sample(c(1:4), nrow(exampleCV), 20)), 100)
exampleCV$EXPT <- exampleCV$BLOCK <- NA
plotFields(x=exampleCV, column="CHECK", main="Fieldplot for dummy example",
           textColumn="GERMPLASM",
           colors=c("grey", "red","blue","green","yellow"))

digiYozhik/msc_thesis documentation built on May 14, 2019, 5:16 p.m.