Example 8.10 Adding Rows to a Table So That All Possible Values of Specific Columns Are Present in Each BY Group
Goal
Add rows to a table so that all possible combinations of specific columns are present in each BY group in the output table. The columns that are not used to define the combinations will have missing values.
This example is similar to Example 8.9 in that it fills out BY groups so that there is the same number of rows in each BY group and each BY group has the same combinations of specific variables. It differs from Example 8.9 in that the columns that define the combinations are character columns and not columns with sequential numeric values. Sequential numeric values as in Example 8.9 are straightforward to program with arrays ...
Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.