designFactors | R Documentation |

Add the following `factor`

s and covariates to a date frame containing imaging data from the Plant Accelerator: Zone, xZone, SHZone, ZLane, ZMainunit, Subunit and xMainPosn. It checks that the numbers of levels of the `factor`

s are consistent with the observed numbers of carts and observations.

```
designFactors(data, insertName = NULL, designfactorMethod = "LanePosition",
nzones = 6, nlanesperzone = 4,
nmainunitsperlane = 11, nsubunitspermain = 2)
```

`data` |
A Smarthouse, Snapshot.ID.Tag, xDAP, and, if |

`insertName` |
A |

`designfactorMethod` |
A |

`nzones` |
A |

`nlanesperzone` |
A |

`nmainunitsperlane` |
A |

`nsubunitspermain` |
A |

The `factor`

s Zone, ZLane, ZMainunit and Subunit are derived for each Smarthouse based on the values of `nzones`

, `nlanesperzone`

, `nmainunitsperlane`

, `nsubunitspermain`

, Zone being the blocks in the split-unit 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 SHZone is formed by combining Smarthouse and Zone and the covariates cZone, cMainPosn and cPosn calculated. The covariate cZone is calculated from Zone and cMainPosn is formed from the mean of cPosn for each main plot.

A `data.frame`

including the columns:

Smarthouse:

`factor`

with levels for the SmarthouseZone:

`factor`

dividing the Lanes into groups, usually of 4 lanescZone: numeric corresponding to Zone, centred by subtracting the mean of the unique positions

SHZone:

`factor`

for the combinations of Smarthouse and ZoneZLane:

`factor`

for the lanes within a ZoneZMainunit:

`factor`

for the main units within a ZoneSubunit:

`factor`

for the subunitscMainPosn: numeric for the main-plot positions within a Lane, centred by subtracting the mean of the unique Positions

cPosn: numeric for the Positions within a Lane, centred by subtracting the mean of the unique Positions

Chris Brien

```
data(exampleData)
longi.dat <- prepImageData(data = raw.dat, smarthouse.lev = 1)
longi.dat <- designFactors(data = longi.dat, insertName = "Reps",
nzones = 1, nlanesperzone = 1, nmainunitsperlane = 10,
designfactorMethod="StandardOrder")
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.