Hi

I have a dataset containing many observations. All variables are string variables (Type: str40 and Format: %40s). However, some variables (of small value) are presented with scientific notation. What should I do in order for the variables to be presented with pure numbers -e.g., 4.00000000000e-06 should be 0.000004?

I have tried this code:

foreach var of varlist Y14M01-Y20M04 {
replace `var' = substr(`var', 1, length(`var') - 4)/1000000 if substr(`var', -4, 1) == "e"
}

which obviously does not work, since the variables are string variables. Also I cannot destring the variables first, since they contain non-numeric values (here "e").
Array