Hi Support Member
You are on the right track. This may be as simple as changing your desired format:
NUMERIC var2 (F4.2).
COMPUTE var2 = NUMBER(var1, F4.2).
EXECUTE.
Your '<0.1' values present a different problem. The presence of the '<' makes these values literally a string. There is no straight conversion for that other than to change the value. Do you also have '>0.1' values? How do you want to treat these?
You might use the RECODE command to change these strings into some other string that would be easy to then convert to a number. Look also at the RECODE command with CONVERT keyword.
https://www.ibm.com/support/knowledgecenter/SSLVMB_27.0.0/statistics_reference_project_ddita/spss/base/syn_recode.html
You might want to use the RTRIM() and LTRIM() functions on a COMPUTE command to strip the spaces and/or other text characters prior to converting to a number.
https://www.ibm.com/support/knowledgecenter/SSLVMB_27.0.0/statistics_reference_project_ddita/spss/base/syn_transformation_expressions_string_functions.html#syn_transformation_expressions_string_functions
I hope this helps!
Support Member
#SPSSStatistics#Support#SupportMigration