Need Help turning matching factors to a vector to create a dummy variable
问题 I am working on a project analyzing natural disasters effect on interest rates. I am trying to control for countries that use the euro. I want to match a vector that describes the countries that use the euro and create a column that has a dummy variable for each country: 1 if they use the euro and 0 if not. Country EURO ARG 0 FRA 1 GBR 0 CHN 0 I've tried to set the euro category to a Boolean variable, but I have not had any success. I am relatively new to R so I am not confident I am coding