Learn R Programming

dmm (version 2.1-3)

print.csummary.dmm: Print method for object of class csummary.dmm.

Description

Formats each attribute of a csummary.dmm object for printing, adding appropriate headings.

Usage

# S3 method for csummary.dmm
print(x, ...)

Arguments

x

An object of class csummary.dmm.

...

Ellipsis argument

Value

There is no return value. Function is used for its side effects.

Details

Each table in an object of class csummary.dmm is a dataframe. This method uses the default dataframe print method to format each table for printing, passing the digits attribute from the csummary.dmm object to the print call.

See Also

Function csummary.dmm().

Examples

Run this code
# NOT RUN {
library(dmm)
data(sheep.df)
sheep.mdf <- mdf(sheep.df,pedcols=c(1:3),factorcols=c(4:6),ycols=c(7:9),
             sexcode=c("M","F"),relmat=c("E","A"))
# make a simple fit object - OLS-b only
sheep.fits <- dmm(sheep.mdf, Ymat ~ 1 + Year + Sex,
          components="VarE(I)",specific.components=list(Sex="VarG(Ia)"))
# compute a 'csummary.dmm' object, use all the defaults
sheep.csum <- csummary(sheep.fits)
# print the summary of genetic parameters
print(sheep.csum)
# }
# NOT RUN {
# can do the same thing without saving response object
csummary(sheep.fits)
# so this is the default print method for an object of class 'csummary.dmm'
# }
# NOT RUN {
#cleanup
rm(sheep.fits)
rm(sheep.csum)
rm(sheep.mdf)
rm(sheep.df)
# }

Run the code above in your browser using DataLab