I'm fairly new to R Statistical Programming and I'm having some issues in creating dummy variables to recode a column of data. Below is a snippet of the dataset:

Year Quarter Sales GNP
2002 1 696048 9740.5
2002 2 753211 9983.5
2002 3 746875 10048.0
2002 4 792622 10184.9
2003 1 704757 10206.2
2003 2 779011 10350.9
2003 3 756128 10332.2
2003 4 827829 10463.1

The three new columns I'm trying to create are d1, d2, and d3. 
d1 is a dummy variable that equals 1 if quarter 1 and 0 otherwise, d2 is a dummy variable that equals 1 if quarter 2 and 0 otherwise, and d3 is a dummy variable that equals 1 if quarter 3 and 0 otherwise. 

I am using the below R code to try and accomplish this:

```
d1 <- ifelse(Quarter == 1, 1, 0)
Retail_Sales_vs_GNP <- data.frame(Retail_Sales_vs_GNP, d1)
d2 <- ifelse(Quarter == 2, 1, 0)
Retail_Sales_vs_GNP <- data.frame(Retail_Sales_vs_GNP, d2)
d3 <- ifelse(Quarter == 3, 1, 0)
Retail_Sales_vs_GNP <- data.frame(Retail_Sales_vs_GNP, d3)

```

However, when I review the new columns all of the values are equal to 0? d1 should equal to 1 if Quarter 1 but it equals 0. What part of my code needs to be revised to accomplish this?