Source code for amjobsg.R
dd$ss=""
dd$ss[dd$statefip == 02] <- "AK"
dd$ss[dd$statefip == 01] <- "AL"
dd$ss[dd$statefip == 05] <- "AR"
dd$ss[dd$statefip == 60] <- "AS"
dd$ss[dd$statefip == 04] <- "AZ"
dd$ss[dd$statefip == 06] <- "CA"
dd$ss[dd$statefip == 08] <- "CO"
dd$ss[dd$statefip == 09] <- "CT"
dd$ss[dd$statefip == 11] <- "DC"
dd$ss[dd$statefip == 10] <- "DE"
dd$ss[dd$statefip == 12] <- "FL"
dd$ss[dd$statefip == 13] <- "GA"
dd$ss[dd$statefip == 66] <- "GU"
dd$ss[dd$statefip == 15] <- "HI"
dd$ss[dd$statefip == 19] <- "IA"
dd$ss[dd$statefip == 16] <- "ID"
dd$ss[dd$statefip == 17] <- "IL"
dd$ss[dd$statefip == 18] <- "IN"
dd$ss[dd$statefip == 20] <- "KS"
dd$ss[dd$statefip == 21] <- "KY"
dd$ss[dd$statefip == 22] <- "LA"
dd$ss[dd$statefip == 25] <- "MA"
dd$ss[dd$statefip == 24] <- "MD"
dd$ss[dd$statefip == 23] <- "ME"
dd$ss[dd$statefip == 26] <- "MI"
dd$ss[dd$statefip == 27] <- "MN"
dd$ss[dd$statefip == 29] <- "MO"
dd$ss[dd$statefip == 28] <- "MS"
dd$ss[dd$statefip == 30] <- "MT"
dd$ss[dd$statefip == 37] <- "NC"
dd$ss[dd$statefip == 38] <- "ND"
dd$ss[dd$statefip == 31] <- "NE"
dd$ss[dd$statefip == 33] <- "NH"
dd$ss[dd$statefip == 34] <- "NJ"
dd$ss[dd$statefip == 35] <- "NM"
dd$ss[dd$statefip == 32] <- "NV"
dd$ss[dd$statefip == 36] <- "NY"
dd$ss[dd$statefip == 39] <- "OH"
dd$ss[dd$statefip == 40] <- "OK"
dd$ss[dd$statefip == 41] <- "OR"
dd$ss[dd$statefip == 42] <- "PA"
dd$ss[dd$statefip == 72] <- "PR"
dd$ss[dd$statefip == 44] <- "RI"
dd$ss[dd$statefip == 45] <- "SC"
dd$ss[dd$statefip == 46] <- "SD"
dd$ss[dd$statefip == 47] <- "TN"
dd$ss[dd$statefip == 48] <- "TX"
dd$ss[dd$statefip == 49] <- "UT"
dd$ss[dd$statefip == 51] <- "VA"
dd$ss[dd$statefip == 78] <- "VI"
dd$ss[dd$statefip == 50] <- "VT"
dd$ss[dd$statefip == 53] <- "WA"
dd$ss[dd$statefip == 55] <- "WI"
dd$ss[dd$statefip == 54] <- "WV"
dd$ss[dd$statefip == 56] <- "WY"
dd$st <- dd$ss
leg <- c("California","Connecticut","DC","Florida","Georgia","Illinois",
"Maryland","Massachusetts","Michigan","New Jersey","New York",
"Ohio","Oregon","Pennsylvania","Texas","Virginia","Washington")
col <- c(2,3,4,5,6,9,10,11,12,13,14,17,18,19,20,21,22)
pch <- c(0,1,2,4,5,6,9,10,11,12,13,14,17,18,19,20,21)
gg <- data.frame(leg=leg,col=col,pch=pch)
#print(head(gg))
dd$sCol="black"
dd$sCol[dd$ss == "CA"] <- gg$col[1]
dd$sCol[dd$ss == "CT"] <- gg$col[2]
dd$sCol[dd$ss == "DC"] <- gg$col[3]
dd$sCol[dd$ss == "FL"] <- gg$col[4]
dd$sCol[dd$ss == "GA"] <- gg$col[5]
dd$sCol[dd$ss == "IL"] <- gg$col[6]
dd$sCol[dd$ss == "MD"] <- gg$col[7]
dd$sCol[dd$ss == "MA"] <- gg$col[8]
dd$sCol[dd$ss == "MI"] <- gg$col[9]
dd$sCol[dd$ss == "NJ"] <- gg$col[10]
dd$sCol[dd$ss == "NY"] <- gg$col[11]
dd$sCol[dd$ss == "OH"] <- gg$col[12]
dd$sCol[dd$ss == "OR"] <- gg$col[13]
dd$sCol[dd$ss == "PA"] <- gg$col[14]
dd$sCol[dd$ss == "TX"] <- gg$col[15]
dd$sCol[dd$ss == "VA"] <- gg$col[16]
dd$sCol[dd$ss == "WA"] <- gg$col[17]
dd$sPch=3
dd$sPch[dd$ss == "CA"] <- gg$pch[1]
dd$sPch[dd$ss == "CT"] <- gg$pch[2]
dd$sPch[dd$ss == "DC"] <- gg$pch[3]
dd$sPch[dd$ss == "FL"] <- gg$pch[4]
dd$sPch[dd$ss == "GA"] <- gg$pch[5]
dd$sPch[dd$ss == "IL"] <- gg$pch[6]
dd$sPch[dd$ss == "MD"] <- gg$pch[7]
dd$sPch[dd$ss == "MA"] <- gg$pch[8]
dd$sPch[dd$ss == "MI"] <- gg$pch[9]
dd$sPch[dd$ss == "NJ"] <- gg$pch[10]
dd$sPch[dd$ss == "NY"] <- gg$pch[11]
dd$sPch[dd$ss == "OH"] <- gg$pch[12]
dd$sPch[dd$ss == "OR"] <- gg$pch[13]
dd$sPch[dd$ss == "PA"] <- gg$pch[14]
dd$sPch[dd$ss == "TX"] <- gg$pch[15]
dd$sPch[dd$ss == "VA"] <- gg$pch[16]
dd$sPch[dd$ss == "WA"] <- gg$pch[17]
dd$ss[dd$ss == "CA"] <- ""
dd$ss[dd$ss == "CT"] <- ""
dd$ss[dd$ss == "DC"] <- ""
dd$ss[dd$ss == "FL"] <- ""
dd$ss[dd$ss == "GA"] <- ""
dd$ss[dd$ss == "IL"] <- ""
dd$ss[dd$ss == "MD"] <- ""
dd$ss[dd$ss == "MA"] <- ""
dd$ss[dd$ss == "MI"] <- ""
dd$ss[dd$ss == "NJ"] <- ""
dd$ss[dd$ss == "NY"] <- ""
dd$ss[dd$ss == "OH"] <- ""
dd$ss[dd$ss == "OR"] <- ""
dd$ss[dd$ss == "PA"] <- ""
dd$ss[dd$ss == "TX"] <- ""
dd$ss[dd$ss == "VA"] <- ""
dd$ss[dd$ss == "WA"] <- ""
Description of code
Source code for amjobsg.R (sourced code)