Different results for same scriptHi,
I´ve created a script where I create a variable for later calculations and I´ve run into two things I cannot explain:
1) On several occasions I´ve seen that running the script twice doesn´t provide the same result. As you can see the first result is a mean of the entire column whereas the second is a single value (the one I need).
2) I´ve also seen that suddenly jmp can´t seem to find the column I´m referring to ("Mean(VO2_M)") even though it has worked fine 5 minutes earlier. If I then copy paste the exact same column name in it´s place it works again. Even though there is no difference at all.
My script:
1st run:<BR />VarVehicleVo2 = :Name( "Mean(VO2_M)" )[Data Table( "GroupAvg" ) <<
Get rows Where( Contains( :Treatment, "ehicle" ))];
/*: (result from log)
[14.9924786986111]<BR />
VarVehicleVo2 = :Name( "Mean(VO2_M)" )[Data Table( "GroupAvg" ) <<
Get rows Where( Contains( :Treatment, "ehicle" ))];
/*: (result from log)
[10.8838853430556]
I´ve seen this quite a few times now so I´m guessing I must be missing something?
Br Julie
Re: Different results for same script- Are you using
Names Default to Here( 1 );
to isolate this script from other scripts that may have previously run during your JMP session?
- Do you have a Name Space called "1st Run"
1st run:VarVehicleVo2
This syntax with the ":" in it indicates that a Name Space or Data Table is available in your JMP session
- You are referencing a non specific data table for your "Mean(Vo2_M)" column
:Name( "Mean(VO2_M)" )
This form of referencing of your column will look in the Current Data Table (I.e. the last one created, or the last one purposefully clicked on or unintentionally clicked on). You should change the reference to make sure it is pointing to the correct data table
dt = Data Table("name of data table");
dt:Name( "Mean(VO2_M)" )
I suspect one or more of these issues are causing your probilem
Re: Different results for same scriptThanks for the response @txnelson .
The 1st run wording isn´t in the script I just tried to describe the order of the runs but I see now that it was very confusing. Sorry about that.
I do have
Names Default to Here( 1 );
at the top of my script without any effect but after adding it to just before the specific part described it actually worked.
However, I actually assumed that I did reference the table:
VarVehicleVo2 = :Name( "Mean(VO2_M)" )[Data Table( "GroupAvg" ) <<
Get rows Where( Contains( :Treatment, "ehicle" ))];
in the first line:
Data Table( "GroupAvg" ) <<
Why is that not enough?
Br Julie