Question
# in r programming # 1) Create an object of S3 class cow containing : An identification Number for the cow The cow breed A
# in r programming #
1) Create an object of S3 class cow containing :
An identification Number for the cow
The cow breed
A dataframe of the cow age (months), milk yield in first lactation (kg), milk yield in second lactation (kg)
2) Create a:
summary() method reporting mean and SD for the lactations of the cow
print() method reporting cow, cow breed, and age in months
3) Repeat 1) and 2) but creating an S4 class
4) Create an S4 class called cowM which inherits the S4 cow class and contains a dataframe with
mastitis in first lactation (presence absence)
mastitis in second lactation (presence absence)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started