Is there any way to create labels for the actual variable names rather
than just the values of a variable without renaming the variable in a
proc freq? Just curious...I guess the easiest way would be to rename
them...
|
|
1
|
|
|
|
Reply
|
RChaar
|
10/18/2010 2:50:33 PM |
|
I'm not sure if I understand what you are asking. You can always
include a label statement. E.g.:
proc freq data=3Dsashelp.class;
label sex=3D"Students' Gender"
age=3D"Students' Age";
tables sex age;
run;
HTH,
Art
---------
On Oct 18, 10:50=A0am, RChaar <rch...@gmail.com> wrote:
> Is there any way to create labels for the actual variable names rather
> than just the values of a variable without renaming the variable in a
> proc freq? =A0Just curious...I guess the easiest way would be to rename
> them...
|
|
0
|
|
|
|
Reply
|
Arthur
|
10/18/2010 3:20:17 PM
|
|
Yeah, I think that is it - thanks so much! :-)
On Oct 18, 11:20=A0am, Arthur Tabachneck <art...@netscape.net> wrote:
> I'm not sure if I understand what you are asking. =A0You can always
> include a label statement. =A0E.g.:
>
> proc freq data=3Dsashelp.class;
> =A0 =A0 label sex=3D"Students' Gender"
> =A0 =A0 =A0 =A0 =A0 age=3D"Students' Age";
> =A0 =A0 tables sex age;
> run;
>
> HTH,
> Art
> ---------
> On Oct 18, 10:50=A0am, RChaar <rch...@gmail.com> wrote:
>
> > Is there any way to create labels for the actual variable names rather
> > than just the values of a variable without renaming the variable in a
> > proc freq? =A0Just curious...I guess the easiest way would be to rename
> > them...
|
|
0
|
|
|
|
Reply
|
rchaar (9)
|
10/18/2010 3:23:22 PM
|
|
Actually, that does not work....I tried it and it puts the label as
like a title under " The FREQ Procedure" but it does not actually
replace the variable name. I think SAS needs to fix that!!!!!
On Oct 18, 11:20=A0am, Arthur Tabachneck <art...@netscape.net> wrote:
> I'm not sure if I understand what you are asking. =A0You can always
> include a label statement. =A0E.g.:
>
> proc freq data=3Dsashelp.class;
> =A0 =A0 label sex=3D"Students' Gender"
> =A0 =A0 =A0 =A0 =A0 age=3D"Students' Age";
> =A0 =A0 tables sex age;
> run;
>
> HTH,
> Art
> ---------
> On Oct 18, 10:50=A0am, RChaar <rch...@gmail.com> wrote:
>
> > Is there any way to create labels for the actual variable names rather
> > than just the values of a variable without renaming the variable in a
> > proc freq? =A0Just curious...I guess the easiest way would be to rename
> > them...
|
|
0
|
|
|
|
Reply
|
rchaar (9)
|
10/18/2010 4:43:19 PM
|
|
Another alternative, then, is to temporarilly recode your data. I
would suggest creating a macro variable to make the code more
readable. For example:
data labels;
informat vname vlabel $32.;
input vname vlabel;
cards;
sex Student_Gender
age Student_Age
;
proc sql noprint;
select catx("=3D",vname,vlabel)
into :labels separated by " "
from labels
;
quit;
proc freq data=3Dsashelp.class
(rename=3D(&labels.));
tables _all_;
run;
Art
------------
On Oct 18, 12:43=A0pm, RChaar <rch...@gmail.com> wrote:
> Actually, =A0that does not work....I tried it and it puts the label as
> like a title under " The FREQ Procedure" but it does not actually
> replace the variable name. =A0I think SAS needs to fix that!!!!!
>
> On Oct 18, 11:20=A0am, Arthur Tabachneck <art...@netscape.net> wrote:
>
>
>
> > I'm not sure if I understand what you are asking. =A0You can always
> > include a label statement. =A0E.g.:
>
> > proc freq data=3Dsashelp.class;
> > =A0 =A0 label sex=3D"Students' Gender"
> > =A0 =A0 =A0 =A0 =A0 age=3D"Students' Age";
> > =A0 =A0 tables sex age;
> > run;
>
> > HTH,
> > Art
> > ---------
> > On Oct 18, 10:50=A0am, RChaar <rch...@gmail.com> wrote:
>
> > > Is there any way to create labels for the actual variable names rathe=
r
> > > than just the values of a variable without renaming the variable in a
> > > proc freq? =A0Just curious...I guess the easiest way would be to rena=
me
> > > them...- Hide quoted text -
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
art297 (4237)
|
10/18/2010 9:58:49 PM
|
|
On Oct 18, 7:50=A0am, RChaar <rch...@gmail.com> wrote:
> Is there any way to create labels for the actual variable names rather
> than just the values of a variable without renaming the variable in a
> proc freq? =A0Just curious...I guess the easiest way would be to rename
> them...
Use proc tabulate instead to control the labels...too hard to manage
in proc freq IMO.
If you put sample proc freq code, I'm sure you could get help
converting to Proc tabulate...but not hard anyways.
|
|
0
|
|
|
|
Reply
|
Reeza
|
10/18/2010 10:53:42 PM
|
|
|
5 Replies
862 Views
(page loaded in 0.093 seconds)
|