You need to start reading some of the basics. Every computer language has its own syntax.
Names Default to Here(1);
dt = Open("$sample_data/Boston Housing.JMP");
dt << Make Validation Column(
Training Set( 0.50 ),
Validation Set( 0.25 ),
Test Set( 0.25 ),
Formula Random
);
cart = dt<< Partition(
Y( :mvalue ),
X(
:crim,
:zn,
:indus,
:chas,
:nox,
:rooms,
:age,
:distance,
:radial,
:tax,
:pt,
:b,
:lstat
),
Validation( :Validation ),
Show Tree( 0 ),
Split History( 1 ),
Informative Missing( 1 ),
Initial Splits(
:lstat >= 7.79,
{:distance < 2.0788, {:nox >= 0.609, {:lstat >= 17.21, {:crim >= 10.8342, {},
{:nox < 0.74}}}}, {:lstat >= 14.8, {:crim >= 0.75026, {:b < 375.87}, {:tax
>= 304}}, {:rooms < 6.726, {:rooms < 6.101, {}, {:tax >= 422, {}, {:lstat
>= 11.98, {}, {:crim < 0.11425, {:rooms < 6.405}}}}}}}},
{:lstat >= 4.32, {:rooms < 6.8, {:rooms < 6.546, {:distance >= 4.4986,
{:indus < 5.64, {}, {:lstat >= 6.15}}}}, {:rooms < 7.52}}, {:b >= 392.83,
{:rooms < 7.61}, {:indus < 18.1}}}
),
SendToReport(
Dispatch( {}, "Partition Report", FrameBox, {Frame Size( 480, 218 )} )
)
);
rsq_dt = report(Cart)[TableBox(1)] << Make into Data Table;
//create a table with extra rows and extra columns
_xx=New Table("result", New Column("d1"), New Column("d2"), New Column("d3"), New Column("d4"),
New Column("Type", Character), New Column("RSQ"),
new Column("RMSE"), New Column("N"), New Column ("nsplits"),
new column("AICc"),
add rows(100)
);
nr = nrow(rsq_dt);
nc = ncol(rsq_dt);
cb=5; ce=cb + nc -1; //Column 5 is wher I want to paste it
rb=50; re=rb + nr -1;
//if rb> nrow(_xx) or ce>ncol(_xx) or the column data types do not match the next line will throw an error.
//it is up to the scripter to do error checking
_xx[rb::re, cb::ce] = rsq_dt[1::nr, 1::nc];
close(rsq_dt, NoSave);
current data table(_xx);
_xx << bring window to front;
_xx << go to row(rb);
_xx << next selected;