I have a dataset that looks like this:

Where each patient has four rows, for both of their ears, at two timepoints. I want to create a new variable that takes from the first row of chemo dose 1, and the second row of chemo dose 2. My desired output is something like this:

How can I create a variable like this in R?
>Solution :
Can you simply mutate(), using if_else()?
library(dplyr)
df %>% mutate(NEW_VARIABLE = if_else(Time_Point=="C1", Chemo_Dose1,Chemo_Dose2))
Output:
Ear Study_ID Chemo_Dose1 Chemo_Dose2 Time_Point NEW_VARIABLE
1 Left Ear CF41853 1200 300 C1 1200
2 Left Ear CF41853 1200 300 Post 300
3 Right Ear CF41854 1200 300 C1 1200
4 Right Ear CF41854 1200 300 Post 300
Input:
structure(list(Ear = c("Left Ear", "Left Ear", "Right Ear", "Right Ear"
), Study_ID = c("CF41853", "CF41853", "CF41854", "CF41854"),
Chemo_Dose1 = c(1200, 1200, 1200, 1200), Chemo_Dose2 = c(300,
300, 300, 300), Time_Point = c("C1", "Post", "C1", "Post"
)), class = "data.frame", row.names = c(NA, -4L))