Help using Base SAS procedures

Is this possible??

Not applicable
Posts: 0

Is this possible??

Further to my previous question:

I have data with movement of people between states e.g.

John Maine Maryland
Steven New York Ohio
David Ohio Chicago

I would like to produce a SAS dataset or excel table which totals the number of people who moved between each state. For example I want to be able to see how many people moved from Ohio to NY and I also need to be able to read off the number of people who moved from NY to Ohio on the same chart.

i.e. read Ohio on the x-axis and NY on the y-axis to see how many moved from Ohio to NY

and read NY on the x-axis and Ohio on the y-axis for NY to Ohio moves

Is this possible? If you use PROC FREQ is it possible to get the data into a file rather than just on the HTML output?

Not applicable
Posts: 0

Re: Is this possible??

Posted in reply to deleted_user
If you are using ODS to output then just use the phtml device and output to a file with .xls as a extension. Excel will open the file, even though it is written in html;.

ods listing close;
ods phtml file='c:\migration.xls';
proc freq data=migration;
tables to*from;
ods phtml close;
ods listing;
Ask a Question
Discussion stats
  • 1 reply
  • 1 in conversation