Merel Bakker
2022-05-30 13:42:27 UTC
I want to convert part of a string variabel into a numeric variabel.
Not via the easy way with ''recode into different variables'', were for example mild -> 0, moderate -> 1, severe -> 2. Where I can change the numbers in labels with 'value' labels.
But a string variable with a width of 2427 characters, with mostly long sentences in them. From those long sentences I want to extract 1 word, and recode that into a numeric variable. So for example from the string: ''there is an infection with toxoplasmosis'', or 'infection with parvo', I want the system to only select strings with sentences that contains the word 'toxoplasmosis'. So far I am not succesfull :)... do I need to write a specific syntax for that?
Many many thanks in advance!
Merel
Not via the easy way with ''recode into different variables'', were for example mild -> 0, moderate -> 1, severe -> 2. Where I can change the numbers in labels with 'value' labels.
But a string variable with a width of 2427 characters, with mostly long sentences in them. From those long sentences I want to extract 1 word, and recode that into a numeric variable. So for example from the string: ''there is an infection with toxoplasmosis'', or 'infection with parvo', I want the system to only select strings with sentences that contains the word 'toxoplasmosis'. So far I am not succesfull :)... do I need to write a specific syntax for that?
Many many thanks in advance!
Merel