elegant is different but is this what you intend to do?
par(mfrow=c(2,2))
plot(r)
r.20 <- calc(r, fun=function(x){ x[x == 20] <- NA; return(x)} )
as.matrix(r.20)
plot(r.20)
r.not20 <- calc(r, fun=function(x){ x[x != 20] <- NA; return(x)} )
plot(r.not20, col="red")
plot(r.20);
par(new=TRUE)
plot(r.not20, col="red", legend=FALSE)