Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Response Limits

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 13, 2018 6:44 AM
(2417 views)

How can I extract the goal and importance of Response limits for all columns in a data table and put them in a new data table along with the column names? This is the script I am working on. I am able to extract out the Importance. Can anyone direct me as to how I can go ahead and extract the Goal from Response Limits? Thanks

dt = Open("C:\Users\MyFile.jmp");

resp = New Table( "ResponeLimits.jmp",

New Column( "ColName", Character, Nominal, width( 30 ) ),

New Column( "Goal", Character, Nominal, width( 30 ) ),

New Column( "Importance", Numeric, Nominal )

);

nc = N Col( dt );

For( i = 1, i <= nc, i++,

If( Column( dt, i ) << get data type() == "Numeric",

If( !Is Empty( x = Column( dt, i ) << get property(( "Response Limits" ),Show Limits(1) )),

resp << add rows( 1, N Row( resp ) );

//Try( Column( resp, "Goal" )[N Row( resp )] = x["Goal"] );

Try( Column( resp, "Importance" )[N Rows( resp )] = x["Importance"] );

Column( resp, "colname" )[N Rows( resp )] = Column( dt, i ) << get name;

)

)

);

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

The issue is that the Goal value returned from the Response Limits is not a string. If you use the Char() function to convert it to a string, it should work as you want

`Try( Column( resp, "Goal" )[N Row( resp )] = char(x["Goal"] ));`

Jim

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

The issue is that the Goal value returned from the Response Limits is not a string. If you use the Char() function to convert it to a string, it should work as you want

`Try( Column( resp, "Goal" )[N Row( resp )] = char(x["Goal"] ));`

Jim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Response Limits

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Response Limits

See script below on how to extract the limits and desirability

```
names default to here(1);
dt=open("$SAMPLE_DATA\Big Class.jmp");
dt:Height << set property("Response Limits",
{Goal( Maximize ), Lower( 50, 2 ), Middle( 60, 4 ),
Upper( 70, 6 ), Importance( 1 ),Show Limits( 1 )} );
// The list returned from the Response Limits is a complex
// list. It requires special parsing to get the values out.
// Retrive the list
ResLimits = dt:Height << get property("Response Limits");
// To get the complete Lower element I have found that one
// has to reference it in relationship to the absolute
// value of the list
LowerVals = ResLimits[2];
arg(LowerVals,2)
// Now, this element can be parsed using different functions
// in JMP. I will use the Arg() function
LowerResLimit = arg(LowerVals, 1);
LowerResDesirability = arg(LowerVals, 2);
```

Jim