SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Messy Data -Column name consisting of two distinct units

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

Messy Data -Column name consisting of two distinct units

Dear all,

 

I have a program which outputs a column name " Dummy 1" -> there is a space between dummy and 1....this makes the processing of the data really difficult. (please also see the screen shot)

 

the program is 

 

proc varmax data=pData;

     model p1 p2 / p=1 print=(estimates)

           ecm=(rank=1 ectrend normalize=p1) lagmax=0;

     ods output      AlphaInECM=AlphaInECM ;

     run;

 

what is an easy way to convert the column name from "Dummy 1 " to Dummy1 or something usable

 

thanks in advance

Sony


Dummy 1.png

Accepted Solutions
Solution
‎06-05-2016 05:34 PM
Respected Advisor
Posts: 4,919

Re: Messy Data -Column name consisting of two distinct units

I have never seen a variable produced by a procedure that got such a name. Are you sure that you are looking at the variable name and not it's label?

 

Otherwise, 

 

data want;

set have;

rename 'Dummy 1'n=Dummy1;

run;

 

will do the name change.

PG

View solution in original post


All Replies
Solution
‎06-05-2016 05:34 PM
Respected Advisor
Posts: 4,919

Re: Messy Data -Column name consisting of two distinct units

I have never seen a variable produced by a procedure that got such a name. Are you sure that you are looking at the variable name and not it's label?

 

Otherwise, 

 

data want;

set have;

rename 'Dummy 1'n=Dummy1;

run;

 

will do the name change.

PG
☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 218 views
  • 0 likes
  • 2 in conversation