Hi,
I'm having trouble using the multiply function in jmp, I wanting to evalute the values before I place them in a table. I have used the debug script and the two variables are evaluating correctly but not multiplying together. Can anyone help?
fl = Files In Directory( cal_path, recursive );
fli = {};
for( y = 1, y<=nitems(fl), y++,
if(left(fl[y],1) == "~", remove from(fl, y));
insertinto(fli,left(substitute(substitute(fl[y],"-",""),"_",""),9));
);
grfactor1 = {};
adjgr1 = {};
agr1 = {};
For( i = 1, i <= N Items( fl ), i++,
currentfile = cal_path || fl[i];
dt = Open( currentfile );
Current Data Table( dt );
name_list = dt << get column names( string );
If( Contains( name_list, "Active Multi" ) == 0 ,
Insert Into( grfactor1, "" );
Insert Into( adjgr1, "" );
close(dt, nosave);
Continue()
);
grfa = :name( "Active Multi 2" )[8];
adjgra = :name( "Active Multi 2" )[20];
Insert Into( grfactor1, grfa );
Insert Into( adjgr1, adjgra );
Close( dt, nosave );
);
agr1=adjgr1;
Multiply to (agr1, grfactor1);
ct = New Table( "historical_data" );
ct << New Column( "GRF1", numeric, values( Eval( grfactor1 ) ) );
ct << New Column( "GRU1", numeric, values( Eval( adjgr1 ) ) );
ct << New Column( "GR1", numeric, formula( GRU1 * GRF1 ) );
ct << new column( "check 1", numeric, values(Eval ( agr1 )));
Thank you in advance.
Tim