I'm working with biochemistry data, and in my data set the concentrations of different hormones are registrered as character variables with a comma as decimal separator instead of (the more international) period. I want to change these character variables to numeric variables, and I have tried to use the INPUT function. This doesn't work - maybe because of the comma as decimal separator? Therefore, my questian is: how do I change the decimal separator from "," to ".", when the data is not even registrered as numeric? Maybe it is the format, that should be changed? My variable is called T3_konc and have mostly data with 1 decimal (e.g. 1,3 and 5,8), but a few is "fail" or "hemolysis". I have tried: Data Thyroid_hormones_new; Set Thyroid_hormones; If T3_konc = ',' then T3_konc='.'; run; This didn't work, maybe because the results are not just a comma - the comma is only the separator. To change from character to numeric variable I have tried: Data Thyroid_hormones; T3_konc_n = input(T3_konc, best9.); run; Thank you!
... View more