Answered step by step
Verified Expert Solution
Question
1 Approved Answer
86 - # Question 2 (Total marks: 11) 87 88 One of R's built-in datasets is ChickWeight . Take some time to bring up and
86 - # Question 2 (Total marks: 11) 87 88 One of R's built-in datasets is ChickWeight . Take some time to bring up and inspect the corresponding help file (obtained by typing "?ChickWeight at the prompt) to familiarise yourself with the nature of the data it contains. 89 90 - ### (a) [3 marks] 91 Of the repeated measurements taken on each chick, a small number of specific chicks were not measured at the final day of the study (day 21) . 92 93 Below you will see an incomplete for loop skeleton. Write code inside the loop, following the steps outlined in the comments, that will automatically identify (and store in the vector badchicks ) the chick IDs that do not have a full set of records (i. e. those chicks that do not have a recorded entry for day 21). You should find that chicks ""8", "15", "16" . "18" and "44" are affected (they are stored as character strings) . HINT: Note that the unique command provides all unique entries in a vector; for example 94 - {r} 95 foo
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