Looking at just the 25 non-cued states. This code assigns participants a 1 for AK if they typed some variant of Alaska in any column, and a 0 otherwise, and likewise for each of the 25 states. Then I add each of the state variables together. I do this first for the cued condition and then for the free recall condition. I also made sure to give credit for any misspelled states.
cued<-subset(p, cued!="NA")
free<-subset(p, freerecall!="NA")
cued$AK<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Alaska", "alaska"))))
cued$CT<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Connecticut", "connecticut", "conneticut"))))
cued$DL<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Delaware", "delaware", "Deleware", "deleware"))))
cued$HI<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Hawaii", "hawaii"))))
cued$ID<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Idaho", "idaho"))))
cued$KS<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Kansas", "kansas"))))
cued$KY<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Kentucky", "kentucky", "Kentuky", "kentuky", "Kenturkey"))))
cued$MD<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Maryland", "maryland"))))
cued$MA<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Massachusetts", "massachusetts", "Massachusets", "Massachussets"))))
cued$MN<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Minnesota", "minnesota", "minesota", "Minesota", "Minessota", "minesotta", "Minesotta"))))
cued$MI<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Mississippi", "mississippi", "Mississipi", "Missisipii", "Missisipi", "mississipi"))))
cued$MT<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Montana", "montana"))))
cued$NB<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Nebraska", "nebraska"))))
cued$NV<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Nevada", "nevada"))))
cued$MD<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Maryland", "maryland"))))
cued$NH<-as.numeric(apply(cued, 1, function(r) any(r %in% c("New Hampshire", "new hampshire", "New hampshire"))))
cued$ND<-as.numeric(apply(cued, 1, function(r) any(r %in% c("North Dakota", "north dakota","North dakota", "north dakato"))))
cued$OK<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Oklahoma", "oklahoma"))))
cued$RI<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Rhode Island", "rhode island", "Rhode island", "Rode Island", "Road island"))))
cued$SD<-as.numeric(apply(cued, 1, function(r) any(r %in% c("South Dakota", "South dakota", "south dakota", "south dakato"))))
cued$UT<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Utah", "utah"))))
cued$WS<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Washington", "washington", "Washington State"))))
cued$WV<-as.numeric(apply(cued, 1, function(r) any(r %in% c("West Virginia", "west virginia", "West virginia"))))
cued$WI<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Wisconson", "wisconsin", "Wisconson", "wisconson"))))
cued$WY<-as.numeric(apply(cued, 1, function(r) any(r %in% c("Wyoming", "wyoming", "Wyonig"))))
cued$cued<-cued$AK + cued$CT+cued$DL+cued$HI+cued$ID+cued$KS+cued$KY+cued$MD+cued$MA+cued$MN+cued$MI+cued$NH+cued$ND+cued$RI+cued$SD+cued$WV+cued$UT+cued$WS+cued$WI+cued$WY
free$AK<-as.numeric(apply(free, 1, function(r) any(r %in% c("Alaska", "alaska"))))
free$CT<-as.numeric(apply(free, 1, function(r) any(r %in% c("Connecticut", "connecticut", "conneticut"))))
free$DL<-as.numeric(apply(free, 1, function(r) any(r %in% c("Delaware", "delaware", "Deleware", "deleware"))))
free$HI<-as.numeric(apply(free, 1, function(r) any(r %in% c("Hawaii", "hawaii"))))
free$ID<-as.numeric(apply(free, 1, function(r) any(r %in% c("Idaho", "idaho"))))
free$KS<-as.numeric(apply(free, 1, function(r) any(r %in% c("Kansas", "kansas"))))
free$KY<-as.numeric(apply(free, 1, function(r) any(r %in% c("Kentucky", "kentucky", "Kentuky", "kentuky", "Kenturkey"))))
free$MD<-as.numeric(apply(free, 1, function(r) any(r %in% c("Maryland", "maryland"))))
free$MA<-as.numeric(apply(free, 1, function(r) any(r %in% c("Massachusetts", "massachusetts", "Massachusets", "Massachussets"))))
free$MN<-as.numeric(apply(free, 1, function(r) any(r %in% c("Minnesota", "minnesota", "minesota", "Minesota", "Minessota", "minesotta", "Minesotta"))))
free$MI<-as.numeric(apply(free, 1, function(r) any(r %in% c("Mississippi", "mississippi", "Mississipi", "Missisipii", "Missisipi", "mississipi"))))
free$MT<-as.numeric(apply(free, 1, function(r) any(r %in% c("Montana", "montana"))))
free$NB<-as.numeric(apply(free, 1, function(r) any(r %in% c("Nebraska", "nebraska"))))
free$NV<-as.numeric(apply(free, 1, function(r) any(r %in% c("Nevada", "nevada"))))
free$MD<-as.numeric(apply(free, 1, function(r) any(r %in% c("Maryland", "maryland"))))
free$NH<-as.numeric(apply(free, 1, function(r) any(r %in% c("New Hampshire", "new hampshire", "New hampshire"))))
free$ND<-as.numeric(apply(free, 1, function(r) any(r %in% c("North Dakota", "north dakota","North dakota", "north dakato"))))
free$OK<-as.numeric(apply(free, 1, function(r) any(r %in% c("Oklahoma", "oklahoma"))))
free$RI<-as.numeric(apply(free, 1, function(r) any(r %in% c("Rhode Island", "rhode island", "Rhode island", "Rode Island", "Road island"))))
free$SD<-as.numeric(apply(free, 1, function(r) any(r %in% c("South Dakota", "South dakota", "south dakota", "south dakato"))))
free$UT<-as.numeric(apply(free, 1, function(r) any(r %in% c("Utah", "utah"))))
free$WS<-as.numeric(apply(free, 1, function(r) any(r %in% c("Washington", "washington", "Washington State"))))
free$WV<-as.numeric(apply(free, 1, function(r) any(r %in% c("West Virginia", "west virginia", "West virginia"))))
free$WI<-as.numeric(apply(free, 1, function(r) any(r %in% c("Wisconson", "wisconsin", "Wisconson", "wisconson"))))
free$WY<-as.numeric(apply(free, 1, function(r) any(r %in% c("Wyoming", "wyoming", "Wyonig"))))
free$free<-free$AK + free$CT+free$DL+free$HI+free$ID+free$KS+free$KY+free$MD+free$MA+free$MN+free$MI+free$NH+free$ND+free$RI+free$SD+free$WV+free$UT+free$WS+free$WI+free$WY
t.test(cued$cued, free$free)
##
## Welch Two Sample t-test
##
## data: cued$cued and free$free
## t = 0.84523, df = 43.253, p-value = 0.4026
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.093930 5.116418
## sample estimates:
## mean of x mean of y
## 10.206897 8.695652