I am hoping to make some functions I have a little more reusable as an example, I am creating a summary table with specific columns from my data set. I would like to pass in the columns list as an argument to allow me to have one "GetSummary" function rather than a "GetExperimentsSummary" and "GetCompoundsSummary" , but as these need different numbers of columns I need to be able to package the list of columns separately (most likely in my class definition) and then pass them to the function as one argument. Is this possible in jsl? What would the syntax be? Examples of my get experiments and get compounds below, and I am on JMP18.
//Get Experiments function
getexperimentssummary = function ({},
original_data << Summary(
Group(
:ExperimentID, :Read Date, :Experiment Type, :Plate Size, :Plate Type,
:Dispense Mode, :Probook Number, :Probook Page Number, :Experiment Notes
),
Freq( "None" ),
Weight( "None" ),
output table name("Experiment_summary")
);
experiment_summary = Data Table ("Experiment_summary");
experiment_id = "ExperimentID";
);
//Get Compounds Summary
getcompoundssummary = Function( {},
original_data << Summary(
Group(
:CompoundID, :Compound, :Compound Lot Number, :Compound Supplier, :Compound Catalog Number
),
Freq( "None" ),
Weight( "None" ),
output table name("Compound_summary")
);
compound_summary = Data Table ("Compound_summary");
Compound_ID = "CompoundID";
);