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
- :
- Newbie question: How can I set variables as values of a column?

Topic Options

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

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

Jul 30, 2015 2:35 PM
(5406 views)

I have 5 variables and need to put them in cells of a new column; I wrote the following script but it doesn't work

New Column**(** "Distance",

Numeric,

Continuous,

Format**(** "Best", **12** **)**,

Set Values**(** **[**char**(**Step1_Cond1**)**, char**(**Step2_Cond1**)**, char**(**Step3_Cond1**)**,

char**(**Step4_Cond1**)**, char**(**Step5_Cond1**)****]** **)**;

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

Hi Rose,

Almost there--

Try the following:

// Create a new table

dt = New Table**(** "TMP" **)**;

// Add a new column to the table called distance

dt << **New Column****(** "Distance",

Character,

Nominal,

Set Values**(** **{**Step1_Cond1, Step2_Cond1, Step3_Cond1, Step4_Cond1, Step5_Cond1**}** **)**

**)**;

Best,

Stan

2 REPLIES 2

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

Hi Rose,

Almost there--

Try the following:

// Create a new table

dt = New Table**(** "TMP" **)**;

// Add a new column to the table called distance

dt << **New Column****(** "Distance",

Character,

Nominal,

Set Values**(** **{**Step1_Cond1, Step2_Cond1, Step3_Cond1, Step4_Cond1, Step5_Cond1**}** **)**

**)**;

Best,

Stan

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

Re: Newbie question: How can I set variables as values of a column?

Thanks a lottttt