Subscribe Bookmark RSS Feed

Multiple Subsets Shortcut?

jarowe

Community Trekker

Joined:

Jul 30, 2014

Is there a way to make multiple subsets from a data table all at once instead of one at a time? I have about 7 separate subsets that I'd like to make so I'm just wondering if there is a quicker way to do this. Thanks!

1 REPLY
Byron_JMP

Staff

Joined:

Apr 26, 2012

Are you trying to subset by a variable?

Data Table( "Big Class" ) << Subset(

  By( :age ),

  All rows,

  Selected columns only( 0 ),

  columns( :name, :sex, :height, :weight )

);

You can put nested subsets into the By argument, for example:

By(:age,:sex)