BookmarkSubscribeRSS Feed
lewisnovack
Calcite | Level 5

 

I get two separate boxes (one for newbeta1 and one for newbeta2). I would like to combine it into one printout. 

 

--------

 

ods html body='hists.htm' style=HTMLBlue;


Proc Means Data = newbeta1 Mean Median Max Min CLM;
var Beta_CCD Beta_FECT Beta_SCCS;
run;


Proc Means Data = newbeta2 Mean Median Max Min CLM;
var Beta_CCD Beta_FECT Beta_SCCS;
run;

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Put the data together then?

 

ods html body='hists.htm' style=HTMLBlue;

proc means data=newbeta1 mean median max min clm noprint;
  var beta_ccd beta_fect beta_sccs;
  output out=want1;
run;

proc means data=newbeta2 mean median max min clm noprint;
  var beta_ccd beta_fect beta_sccs;
  output out=want2;
run;

data want;
  set want1 want2;
run;

proc print data=want;
run;

ods html close;

Note how I use the code window - its the {i} above post area.

 

 

I would also ask why you have two datasets, with the same data?  Why is there newbeta1 and newbeta2?  Why not just put them together with a group by variable, then you only need one proc means (i.e. rarely a good idea to split like data up):

ods html body='hists.htm' style=HTMLBlue;

data newbeta;
  set newbeta1 newbeta2 indsname=tmp;
  dsname=tmp;
run;

proc means data=newbeta mean median max min clm;
  var beta_ccd beta_fect beta_sccs;
  by dsname;
run;

ods html close;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 513 views
  • 2 likes
  • 2 in conversation