Description Usage Arguments Details Value See Also Examples
Read in the Z matrix that assigns groups/strains/lines to their trait measurements.
1 |
filename |
contains the name of the Z matrix file. The file name needs to be in quotes. If the file is not in the working directory, then the full path to the file is required. |
The underlying linear mixed model is of the form
Y = X β + Z u_g + e
where Z is a (n x n_g) matrix that contains ones and zeros, n is the number of trait measurements, and n_g is the number of groups/strains/lines. If n and n_g are the same, then there is no need to specify Z. However, if a group/strain/line has multiple trait measurements (i.e. n > n_g) then the Z matrix is needed to tell Eagle which trait measurements belong to which groups/strains/lines.
A space separated text file is assumed. Each row of the matrix contains multiple zeroes but only a single one. The file cannot contain column or row headings. The file also cannot contain a row of only zeroes. Here, n must be larger than n_g otherwise an error will be issued.
a data matrix is returned of the Z matrix.
ReadMarker
and ReadPheno
.
1 2 3 4 5 6 7 8 9 10 | # Read in example Z matrix from ./extdata/
# find the full location of the Z matrix data
complete.name <- system.file('extdata', 'Z.txt', package='Eagle')
# read in Z matrix data
Z_obj <- ReadZmat(filename=complete.name)
# look at first few rows of the Z matrix file
head(Z_obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.