con_concur: View concurrence of two factors in a dataframe using a matrix...

View source: R/functions.R

con_concurR Documentation

View concurrence of two factors in a dataframe using a matrix plot.

Description

Draws a concurrence plot of 2 factors in a dataframe. For example, in a multi-environment yield trial (testing multiple crop varieties in multple environments) it is interesting to examine the balance of the testing pattern. For each pair of environments, how many genotypes are tested in both environments? The concurrence plot shows the amount of connectedness (number of varieties) of the environments with each other.

By default, missing values in the response are deleted.

Replicated combinations of the two factors are ignored. (This could be changed if someone has a need.)

Usage

con_concur(
  data,
  formula,
  dropNA = TRUE,
  xlab = "",
  ylab = "",
  cex.x = 0.7,
  cex.y = 0.7,
  ...
)

Arguments

data

A dataframe

formula

A formula with multiple factor names in the dataframe, like y ~ f1 / f2.

dropNA

If TRUE, observed data that are NA will be dropped.

xlab

Label for x axis

ylab

Label for y axis

cex.x

Scale factor for x axis tick labels. Default 0.7.

cex.y

Scale factor for y axis tick labels Default 0.7.

...

Other parameters passed to the levelplot() function.

Value

A lattice graphics object

Author(s)

Kevin Wright

References

None

Examples

require(lattice)
bar = transform(lattice::barley, env=factor(paste(site,year)))
set.seed(123)
bar <- bar[sample(1:nrow(bar), 70, replace=TRUE),]
con_concur(bar, yield ~ variety / env, cex.x=0.75, cex.y=.3)


connected documentation built on April 12, 2025, 2:24 a.m.