<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />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.
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");
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);
);