designFactors {imageData} | R Documentation |
Adds the factors and covariates for a blocked, split-plot design
Description
Add the following factors and covariates to a date frame containing imaging data from the Plant Accelerator: Zones, xZones, SHZones, ZLane, ZMainplots, Subplots and xMainPosn. It checks that the numbers of levels of the factors are consistent with the observed numbers of carts and observations.
Usage
designFactors(data, insertName = NULL, designfactorMethod = "LanePosition",
nzones = 6, nlanesperzone = 4, nmainplotsperlane = 11, nsubplotspermain = 2)
Arguments
data |
A Smarthouse, Snapshot.ID.Tag, XDays, xPosn and, if |
insertName |
A |
designfactorMethod |
A |
nzones |
A |
nlanesperzone |
A |
nmainplotsperlane |
A |
nsubplotspermain |
A |
Details
The factors Zones, ZLane, ZMainplots and Subplots are derived for each Smarthouse based on the values of nzones
, nlanesperzone
, nmainplotsperlane
, nsubplotspermain
, Zones being the blocks in the split-plot design. Thus, the number of carts in each Smarthouse must be the product of these values and the number of observations must be the product of the numbers of smarthouse, carts and imagings for each cart. If this is not the case, it may be able to be achieved by including in data
rows for extra observations that have values for the Snapshot.ID.Tag, Smarthouse, Lane, Position and Time.after.Planting..d. and the remaining columns for these rows have missing values (NA
) Then SHZones is formed by combining Smarthouse and Zones and the covariates xZones and xMainPosn calculated. The covariate xZones is calculated from Zones and xMainPosn is formed from the mean of xPosn for each main plot.
Value
A data.frame
including the columns:
Smarthouse: factor with levels for the Smarthouse
Zones: factor dividing the Lanes into groups, usually of 4 lanes
xZones: numeric corresponding to Zones, centred by subtracting the mean of the unique positions
SHZones: factor for the combinations of Smarthouse and Zones
ZLane: factor for the lanes within a Zone
ZMainplots: factor for the main plots within a Zone
Subplots: factor for the subplots
xMainPosn: numeric for the main-plot positions within a Lane, centred by subtracting the mean of the unique positions
Author(s)
Chris Brien
Examples
data(exampleData)
longi.dat <- designFactors(longi.prime.dat, insertName = "xDays",
nzones = 1, nlanesperzone = 1, nmainplotsperlane = 10,
designfactorMethod="StandardOrder")