I have a dataset of long strings where different positions represent different variables. Thus, I want to separate each character of the string out into separate variables.
A trimmed-down version of the data looks like this:
I tried to split it up using the following code:
, but this just generated a lot of blank variables.
Any help here would be much appreciated!
Note: I ultimately want to have each blank space of the string as a a separate variable too.
A trimmed-down version of the data looks like this:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str39 A "350AK001046 921 01100210 " end
I tried to split it up using the following code:
Code:
split A, p("A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" " ")
Any help here would be much appreciated!
Note: I ultimately want to have each blank space of the string as a a separate variable too.
Comment