- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Select column group from a list
Using an associative array, I have a list containing the titles of column groups (common). I tried to use select column group with that but it doesn't work as is. What modifications do I need to make for this to work?
dt << select column group( common );
Slán
SpannerHead
2 ACCEPTED SOLUTIONS
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select column group from a list
Ignore me! Figured it out. Duh!
For( g = 1, g <= N Items( common ), g++,
dt << select column group( common[g] )
);
Slán
SpannerHead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select column group from a list
You can also use list with select column group but you have to evaluate it
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);
groupnames = {"xy", "pollutants"};
Eval(EvalExpr(dt << select column group(Expr(groupnames))));
-Jarmo
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select column group from a list
Ignore me! Figured it out. Duh!
For( g = 1, g <= N Items( common ), g++,
dt << select column group( common[g] )
);
Slán
SpannerHead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select column group from a list
You can also use list with select column group but you have to evaluate it
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);
groupnames = {"xy", "pollutants"};
Eval(EvalExpr(dt << select column group(Expr(groupnames))));
-Jarmo