0
votes

I have a dataset at work that is a numeric variable when I do a PROC CONTENTS. However, when I look at the actual underlying data, there are letters values that are part of the variable like 'R', 'A', etc....

Was wondering if anyone has an explanation for how/why SAS allows this kind of type assignment?

1

1 Answers

0
votes

It's not except if :

1) You have a format applied to the variable that is displaying it as a character variable. The display appears as a character, however the underlying variable is numeric.

proc format ;
    value age 
    0 - 10='young' 
    11 - 12='preteen' 
    13 - 19='teen'
    ;
run;

proc print data=sashelp.class;
    format age age.;
run;

2) If it's actually .R/.A, these are special missing variables.

My guess is that you have a format applied to the data.