发布日期: 04/13/2021

Lists

Lists are containers to store items, such as the following:

numbers

variables

character strings

expressions (for example, assignments or function calls)

matrices

nested lists

Create a list in one of the following ways:

use the List function

use {  } curly braces

Examples

Use the List() function or curly braces to create a list that includes numbers and variables:

x = List(1, 2, b);
x = {1, 2, b};

A list can contain text strings, nested lists, and function calls:

{"Red", "Green", "Blue", {1, "true"}, sqrt( 2 )};

You can place a variable into a list and assign it a value at the same time:

x = {a = 1, b = 2};
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).