dear all
i have 40 different variables in my dataset.
some of the variables are in character form and some are numeric.
I have to convert all tthe variables into numeric form.
how to do it in SAS.
thanks in advance.
dear draycut
i tried the following code from the link suggested by you.
But it is not working.
data test2;
set test;
array ch(*) $ &c_list;
array nu(*) &n_list;
do i = 1 to dim(ch);
nu(i)=input(ch(i),8.);
end;
drop i &c_list;
rename &renam_list;
run;
there are some other codes also. but i could not understand them.
i am attaching the error displayed by SAS
please help me solving the problem
thanks in advance
Ideally, you do that when you import the data into SAS by making sure that the values are read correctly.
How did you receive the data, and how did you import it?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.