Hi Everyone, I'm doing the online SAS Programming 1 class and I'm having trouble getting my labels to show in SAS Enterprise Guide. We're using the sashelp.cars table and this is in activity p105a04. We're supposed to use a data statement to assign permanent labels to some columns, then run the means and print procedures with the output using the labels rather than the original column names. This is the code that I have, which matches exactly with what the solution has: data cars_update;
set sashelp.cars;
keep Make Model MSRP Invoice AvgMPG;
AvgMPG=mean(MPG_Highway, MPG_City);
label MSRP="Manufacturer Suggested Retail Price"
AvgMPG="Average Miles per Gallon"
Invoice="Invoice Price";
run;
proc means data=cars_update min mean max;
var MSRP Invoice;
run;
proc print data=cars_update label;
var Make Model MSRP Invoice AvgMPG;
run; The labels for the columns should be replaced with my new labels (eg. MRSP should be "Manufacturer Suggested Retail Price"), but it's only showing the original column names. Here's what the output tables look like: I looked at proc contents like she did in the lesson, but the labels weren't in there. I also tried using the proc print statement with temporary labels, but the labels didn't show up for that either: proc print data=cars_update label;
var Make Model MSRP Invoice AvgMPG;
label MSRP="Manufacturer Suggested Retail Price"
AvgMPG="Average Miles per Gallon"
Invoice="Invoice Price";
run; Any help would be greatly appreciated! Thanks in advance!
... View more