Substring (General Concept)
A substring is a subset of characters from a string. Extracting substrings in SPSS is done with CHAR.SUBSTR (SPSS versions 16+) or just SUBSTR (SPSS versions 15-). CHAR.SUBSTR takes two or three arguments as shown by the minimal example below. SPSS CHAR.SUBSTR – Minimal Example COMPUTE var_2 = CHAR.SUBSTR(var_1,3,2). The three arguments mean the following: var_1 denotes the variable […]
