Simple code help!

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

Simple code help!

I am learning the base programming skills using SASHELP.CARS lib.

I want to sum the msrp (may seem useless) but want to try and learn what i am missing. Any advise.

basically want to see : Origin Make sum(msrp) and avg (msrp).

Thanks

R



Accepted Solutions
Solution
‎08-21-2012 06:45 PM
Super User
Super User
Posts: 6,502

Re: Simple code help!

proc means data=sashelp.cars sum mean;

  class origin make;

  var msrp;

run;

View solution in original post


All Replies
Super User
Posts: 17,864

Re: Simple code help!

Check here for basic tutorials:

http://www.ats.ucla.edu/stat/sas/

And to answer your question use proc means.

proc means data=sashelp.cars n sum avg;

class origin make;

var msrp;

run;

Solution
‎08-21-2012 06:45 PM
Super User
Super User
Posts: 6,502

Re: Simple code help!

proc means data=sashelp.cars sum mean;

  class origin make;

  var msrp;

run;

Contributor
Posts: 29

Re: Simple code help!

Tom/Reeza - Thank you for your quick response.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 169 views
  • 0 likes
  • 3 in conversation