# in r programming # 1) Create an object of S3 class “cow” containing : An ident
ID: 3864555 • Letter: #
Question
# 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)
Explanation / Answer
# Constructor function for class animalRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.