HP 50g — import statistical data into hypothesis test
|
12-07-2018, 05:30 PM
Post: #11
|
|||
|
|||
RE: HP 50g — import statistical data into hypothesis test
(12-07-2018 04:22 AM)Carsen Wrote: I'm mostly ignorant of the statistical features of the 50g (and statistics in general), but looking at the above code, it strikes me that there's a simplification that might be useful here. STO has the ability to accept lists of both values and variable names, so an alternative form of the above could be: Code: \<< STO iterates through the ID list in the order given, matching the IDs with the corresponding values in the list from stack level 2. Since the most recently stored object shows up at the beginning of your var list (assuming it hasn't already been stored in the current search path), I've reversed the order of values and IDs so that they end up in the desired order without having to execute the ORDER command. The downside to this is that subsequent calls to the program won't move the variables to the beginning of the directory. If this is important, a slight change to the above should take care of that: Code: \<< Finally, a word of caution about the ORDER command: If ORDER is executed from a running program, there's a particular situation that will cause it to throw an "Invalid Syntax" error. If the program object containing the ORDER command would itself be moved as a result of its execution, the command will fail, sometimes after already having moved some of the identified objects. I believe that's not likely to happen here, but it's useful to bear that in mind whenever using ORDER in a program. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)