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
- :
- entering all values (rows) of a coulumn in a formula

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 4, 2017 4:51 PM
(3573 views)

Hi all,

need to enter all values of a column into another column formuma as in the picture below. what is the best way of doing this other than manually?

thanks!

ron

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 JSL I included is a formula. Below are images of applying this to the Big Class data table, where I have changed the name of Height to Cash, and added a column called Column 6 where I added the JSL as the formula for it.

Jim

4 REPLIES 4

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

Re: entering all values (rows) of a coulumn in a formula

I would just read them in as a list or matrix

```
dt = Current Data Table();
v = dt:height << get values;
// or
v = As List( dt:height << get values );
```

Here is a complete version

```
Names Default To Here( 1 );
dt = Current Data Table();
v = As List( dt:cash << get values );
TheExpr = "x=internal rate of return(0.1";
For( i = 1, i <= N Items( v ), i++,
TheExpr = TheExpr || ", " || Char( v[i] )
);
TheExpr = TheExpr || ");";
Eval( Parse( TheExpr ) )
;
x;
```

Jim

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

Re: entering all values (rows) of a coulumn in a formula

Thank you Nelson, this does bring the answers neatly yet I was wondering if i could have it in the table itself so it will automatically update as i change the values in the cash column.

ron

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

The JSL I included is a formula. Below are images of applying this to the Big Class data table, where I have changed the name of Height to Cash, and added a column called Column 6 where I added the JSL as the formula for it.

Jim

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

Re: entering all values (rows) of a coulumn in a formula

Thanks again, this is perfect.

Perhaps in a future version of JMP they will introduce a standard way of entering all values of a column in to a formula. It is actually useful in many applications.

What is more striking to me in this specific example using Big Class is that the internal rate of return of an all positive series comes out as negative!!! just makes you wonder what is in the "black box"

Ron