doc: Move output examples from "examples" to "pspp-figures".
[pspp] / doc / pspp-figures / autorecode.sps
diff --git a/doc/pspp-figures/autorecode.sps b/doc/pspp-figures/autorecode.sps
new file mode 100644 (file)
index 0000000..4c0b3f3
--- /dev/null
@@ -0,0 +1,20 @@
+get file='personnel.sav'.
+
+* Correct a typing error in the original file.
+do if occupation = "Scrientist".
+ compute occupation = "Scientist".
+end if.
+
+autorecode
+       variables = occupation into occ
+       /blank = missing.
+
+* Delete the old variable.
+delete variables occupation.
+
+* Rename the new variable to the old variable's name.
+rename variables (occ = occupation).
+
+* Inspect the new variable.
+display dictionary /variables=occupation.
+