cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Working with Lists

Started ‎11-08-2022 by
Modified ‎11-08-2022 by
View Fullscreen Exit Fullscreen

Lists are dynamic. You can easily add items to or remove items from a list as necessary. You use the Insert function or the Insert Into function to add items to a list. By default, the items are added at the end of the list. Optionally, you can include an argument to specify the position of the item you're adding. The Insert function returns a new list with the added item but doesn't change the original list. The Insert Into function changes the original list but does NOT return a new list-- this is known as acting 'in place'. Similarly, you use the Remove function or the Remove From function to delete items from a list. By default, the items are deleted from the end of the list. Optionally, you can include an argument to specify the position of the item you want to remove. Another optional argument specifies the number of items to be deleted. The Remove function returns a new list without the deleted items but doesn't change the original list. The Remove From function, like the Insert Into function, acts "in place", so it changes the original list but doesn't return a new list. JMP generally evaluates code immediately, but it does not automatically evaluate the items in a list. This postponement can be useful: you can collect items in a list, then examine them for potential errors and make any necessary changes before evaluation. Then you can use the Eval List function to create a new list in which every item is the result of evaluating the corresponding item in the original list, but the original list is unchanged.