cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
SpannerHead
Level VI

Retrieve a Column Group

I have columns held within groups and I want to be able to reference the group to which each column belongs as a string while I iterate on them.  Is that possible?


Slán



SpannerHead
1 REPLY 1
jthi
Super User

Re: Retrieve a Column Group

Use << Get Column Group Names to get list of the names and then << Get Column Group to get the list of columns

jthi_0-1743014300235.png

 

Edit: If you wish to have strings, loop over the list of columns using Transform Each and then convert them to strings using << Get Name

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);

colrefs = dt << get column group("xy");

colnames = Transform Each({colref}, colrefs,
	colref << get name
);


show(colrefs, colnames);

 

 

 

-Jarmo

Recommended Articles