Strings in Ramond-Ramond backgrounds from the Neveu-Schwarz-Ramond formalism