Subscribe Bookmark RSS Feed

In JSL I want to copy the data from a named group of columns to another table with the same size named group of columns.

gene

Community Trekker

Joined:

Jun 23, 2011

I have two tables.  Each has a named group of columns.  I want to copy the data from the Source Spectra table, from the group named "source"  to the Target Spectra table in the column group target.  I need to do this with JSL.

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

This is one way to do it:

dts = data table("Source Spectra");

dtt = data table("Target Spectra");

dts_cols = dts << get column names(string);

for (i = 1, i <= nitems(dts_cols), i++,

     one_column = dts_cols[i];

     dts_values = column(dts, one_column) << get values;

     new_column = substitute(one_column, "Column", "target");

     column(dtt, new_column) << set values(dts_values);

);

ms

Super User

Joined:

Jun 23, 2011

There's usually more than one way to do it in JMP...

dts = Data Table("Source Spectra");

dtt = Data Table("Target Spectra");

dts << Bring Window To Front << Clear Column Selection << clear select << select column group("source");

Main Menu("Copy");

dtt << Bring Window To Front << Clear Column Selection << clear select << select column group("target");

Main Menu("Paste");