logo_learn_stats

The right way to Take away Variable Labels in SAS (With Examples)

Posted on
banner 336x280


You’ll be able to worth please see forms to take away variable labels in SAS:

banner 468x60

Form 1: Take away Label from One Variable

proc datasets lib=paintings;
  adjust original_data;
  attrib my_variable label='';

Form 2: Take away Label from All Variables

proc datasets lib=paintings;
  adjust original_data;
  attrib _all_ label='';

Please see examples display how one can worth each and every form in apply with please see dataset that has 3 variables with a label for each and every variable:

/*develop dataset*/
information original_data;
   label x='REBOUNDS'
         y='POINTS'
         z='ASSISTS';
   enter x y z;
datalines;
6 22 5
8 14 9
9 31 10
9 40 7
3 12 3
2 20 5
;

/*view contents of dataset*/
proc contents information=original_data;

Instance 1: Take away Label from One Variable

Please see code displays how one can worth proc datasets to take away the label from simply the variable known as ‘x’ in our dataset:

proc datasets lib=paintings;
  adjust original_data;
  attrib x label='';

Realize that the label has been got rid of from variable x generation the alternative variables within the dataset have remained unchanged.

Instance 2: Take away Label from All Variables

Please see code displays how one can worth proc datasets to take away the label from all variables within the dataset:

proc datasets lib=paintings;
  adjust original_data;
  attrib _all_ label='';

Realize that the labels for the entire variables within the dataset were got rid of.

Observe: You’ll be able to to find the whole documentation for proc datasets right here.

Extra Assets

Please see tutorials provide an explanation for how one can carry out alternative habitual duties in SAS:

The right way to Normalize Knowledge in SAS
The right way to Establish Outliers in SAS
The right way to Take away Numbers from Story in SAS
The right way to Take away Well-known Zeros in SAS

banner 336x280

Leave a Reply

Your email address will not be published. Required fields are marked *