The clustering of barred galaxies in the local Universe