everyone,
I have the following data set (called demo).
Nation GDP FHouse OECD regime
1 Albania 3719 4.5 0 not free
2 Algeria 5327 5.5 0 not free
3 Angola 1462 6.0 0 not free
4 Argentina 12095 1.5 0 free
5 Armenia 2421 4.0 0 not free
6 Australia 27390 1.0 1 free
I made a plot make a plot of GDP and Fhouse.
plot(demo$GDP, demo$FHouse, xlab = "Country's GDP", ylab = "Freedom House Rating", pch=16, xlim = c(500,5000), family="serif")
Now, I am being asked to color each point based on regime (free,not free, partly free). I've been reading, and apparently I can use ifelse, however, I don't know how to give it three conditions so that each country is colored based on free, not free, and partly free.
Thank you all.