- df
- A dataframe object with columns labelled: - 
- Id
- An identifier for each individual 
 
- SId
- An identifier for each sire 
- DId
- An identifier for each dam 
- Sex
- A coding for sex of each individual 
- Fixed effect names
- Codings for each fixed effect 
- Observation names
- Numerical values for each trait 
  
pedcols
A vector specifying which columns of df contain the pedigree information (ie Id, SId, and DId). The vector can contain either column numbers, or column names. The dafault is c(1:3).
  
factorcols
A vector specifying which columns of df contain codes for factors which are to be used as either fixed effects or in defining cohort. The default is NULL.
  
ycols
A vector specifying which columns of df contain observations which are to become traits in a matrix. The default is NULL. The matrix is always called 'Ymat'.
  
sexcode
A vector of length 2 specifying the codings used for Sex, with the heterogametic sex code given first position. This should always be specified. The default is NULL. If the Sex column in the dataframe df is a character vector, then sexcode should be a charcter vector. If the Sex column in the dataframe df is an integer vector, then sexcode should be an integer vector. If the Sex column in the dataframe df is a character vector coerced to a factor, then sexcode should be a charcter vector. If the Sex column in the dataframe df is an integer vector coerced to a factor, then sexcode should be an integer vector.
  
keep
A logical variable. Are columns not specified by pedcols, factorcols, or ycols to be retained in the output object? Default is FALSE - ie unused columns are discarded.
  
relmat
A vector listing the relationship matrices to be generated and appended to the dataframe thus creating a return object of class mdf.
Each relationship matrix has a code letter or name as follows:
- "E"
- An environmental correlation matrix. At present this produces an identity matrix - ie no environmental correlation effects. Must always be included. 
"A"Additive genetic relationship matrix.
"D"
Dominance relationship matrix.
"Dsim"
Dominance relationship matrix by the simulation method (see nadiv).
"AA"
Additive x additive epistatic relationship matrix.
"AD"
Additive x dominance epistatic relationship matrix.
"DD"
Dominance x dominance relationship matrix.
"S"
Sex linked additive genetic relationship matrix with no global dosage compensation ('ngdc' option see nadiv)
"S.hori"
Sex linked additive genetic relationship matrix with 'hori' dosage compensation model ( see nadiv)
"S.hedo"
Sex linked additive genetic relationship matrix with 'hedo' dosage compensation model ( see nadiv)
"S.hoha"
Sex linked additive genetic relationship matrix with 'hoha' dosage compensation model ( see nadiv)
"S.hopi"
Sex linked additive genetic relationship matrix with 'hopi' dosage compensation model ( see nadiv)
Default is NULL - ie no relationship matrices constructed.