I'm confused with an exercise that i'm working on in R. I'm just a beginner in R
the instructions is to Use dplyr
to manipulate the data so that you have the proportion immunised (i.e. Immunised divided by Eligible) for each DHB
, for each Age
, and each Date
. Save the result so you can use it for the remaining questions. You should end up with a data frame containing variables for DHB
, Date
, Age
and Proportion
with 4834 observations.
But I don't understand how to do this but this is what i've tried
```{r}
vacc %>% mutate(Proportion = Immunised/DHB(vacc))
vacc %>% select(DHB, Date, Age, Proportion)
```
but it gave me this error
Error: Problem with `mutate()` input `Proportion`. x could not find function "DHB" i Input `Proportion` is `Immunised/DHB(vacc)`.
can someone please help me