I am trying to create a binary variable where if an individual did not make $100 or more in all four quarters of a year they are listed as 0; if an individual did make $100 or more they are listed as 1. Below is an example of the desired output that I am trying to make. I have created the Binary column, I just need Binary2
dd <- read.table(text="
MPI yrqtr Wage Binary Binary2
PersonA 20101 100 1 1
PersonA 20102 100 1 1
PersonA 20103 100 1 1
PersonA 20104 100 1 1
PersonA 20111 100 1 0
PersonA 20112 100 1 0
PersonA 20113 100 1 0
PersonA 20114 50 0 0", header=T)