make_design_rectangular: Add observations to a data frame so that the design is...

Description Usage Arguments Details Value Author(s) Examples

Description

Add observations to a data frame so that the design is rectangular (per field).

Usage

1
make_design_rectangular(object, fields, rows = "ROW", ranges = "RANGE")

Arguments

object

A data frame with at least the columns rows, ranges and fields, where fields refer to locations.

fields

Character string specifying the column name with the fields names corresponding to the field locations in object.

rows

(Optional) Character string specifying the column name with the ROW-coordinates in object. Default = "ROW".

ranges

(Optional) Character string specifying the column name with the RANGE-coordinates in object. Default = "RANGE".

Details

For each level of fields, a rectangular design is created by adding empty observations for the missing rows and ranges.

Value

An extended version of the data frame object.

Author(s)

Ruud Derijcker

Examples

1
2
3
4
5
6
7
data(exampleCV)
scheme1 <- crossValidate(x=exampleCV, id="GERMPLASM", factor="LOCATION",
                         k=5, replication=3, seed=NULL, exclusive=TRUE,
                         sampling="randomByFactor",verbose=TRUE)
P2 <- data.frame(exampleCV, scheme1)
P2 <- make_design_rectangular(P2, fields="LOCATION",rows="ROW",ranges="RANGE")
head(P2)

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