Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Intro. Run this to see what the ChickWeight dataset looks like: ` ` ` { r } ChickWeight % > % head ( ) ChickWeight
Intro. Run this to see what the ChickWeight dataset looks like:
r
ChickWeight head
ChickWeight tail
### a Create a table of the median chick weight for each diet name it medianweightbydiet Call the column containing this median weight medianweight Save this table as Q
r
medianweightbydiet ChickWeight
# complete this
medianweightbydiet
We don't know if this tells the whole story.
The chicks grew, but it's possible that those in one diet were measured less often than those in another.
Let's look at some general exploratory analysis. Write code that answers these questions:
### b How many rows are there for each diet? Save the result as rowsperdiet.
r
rowsperdiet
### c How many rows are there for each chick? Save the result as rowsperchick.
Note! this will also allow you to figure out how many chicks there are in this data. There will be one row per chick.
r
rowsperchick
### d How many chicks were on each diet? Create a table that answers this question and save it to variable chicksperdiet. Make this table only from the functions we we learned about: groupby mutate, select, filter, arrange, summarize, tallyYou will not need all of these functions.
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