DATA Step, Macro, Functions and more

CHAR to NUMERIC

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

CHAR to NUMERIC

I am trying to convert char to numerci from original data set.

data census.numeric;
set census.rough;
VEHn=input(VEH,1.);
HFLn=input(HFL,1.);
run;

It works as well. Just want to check, if we can in some way associate some info about the new variables that we create so that when i  do a proc contents on the new data ser the new variables also have some info about them.

Now there is no info about what they are since i replaced the original with these new ones.


Accepted Solutions
Solution
‎09-13-2016 12:16 AM
Trusted Advisor
Posts: 1,378

Re: CHAR to NUMERIC

I guess you want to add labels to the new variables ?!

 

 

data census.numeric;
set census.rough;
VEHn=input(VEH,1.);
HFLn=input(HFL,1.);

LABEL

   VEHn  = '  your info for this var '

    HFLn =  '  your info for this var'

  ;

run;

View solution in original post


All Replies
Solution
‎09-13-2016 12:16 AM
Trusted Advisor
Posts: 1,378

Re: CHAR to NUMERIC

I guess you want to add labels to the new variables ?!

 

 

data census.numeric;
set census.rough;
VEHn=input(VEH,1.);
HFLn=input(HFL,1.);

LABEL

   VEHn  = '  your info for this var '

    HFLn =  '  your info for this var'

  ;

run;

Occasional Contributor
Posts: 7

Re: CHAR to NUMERIC

THank you so much.. I dont know y i dont get that..
Looks like a stupid question now..
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 225 views
  • 1 like
  • 2 in conversation