You just need quotation marks:
pvalue <- anova(m2,m1)$"Pr(>F)"
You can access the second element of pvalue using normal bracket subsetting:
pvalue[2]
So in your example I believe you'll use
Coop <- anova(M6,Models5[[B]])$"Pr(>F)"[2]
(Although without access to M6, I can't be totally sure).
The str
command is very useful in this sort of situation, to figure out what kind of object you're dealing with:
str(myanova$"Pr(>F)")