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
- :
- Discussions
- :
- Re: Rows from table as part of formula for columns in a different table

Topic Options

- Start Article
- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 7, 2012 2:20 PM
(4213 views)

Hi all,

I am attempting to make a new data table with columns based on a formula using row values from a previous table, each row used at a time like this:

dttest << New Column( "Test 1",

formula(random normal( (slope* *Row1 of first table*) + meantime, assay ))

);

dttest << New Column( "Test 2",

formula(random normal ( (slope * *Row2 of first table*) + meantime, assay))

);

dttest << New Column( "Test 3",

formula(random normal ( (slope ** Row3 of first table*) + meantime, assay))

thanks for any help or tips in the right direction

Solved Go to Solution

1 ACCEPTED SOLUTION

Accepted Solutions

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

Consider this approach. It will create the column values as desired, but will not be dynamic. If the first table is updated, it will not update the values in dttest. If this is not a requirement, then set each value can be a flexible command to introduce values and references from other tables or from inside variables.

dttest << New Column( "Test 1",

<<seteachvalue(random normal( (slope* column(first table global, column name or number from first table)[1]) + meantime, assay ))

);

dttest << New Column( "Test 2",

<<seteachvalue(random normal ( (slope * column(first table global, column name or number from first table)[2]) + meantime, assay))

);

dttest << New Column( "Test 3",

<<seteachvalue(random normal ( (slope *column(first table global, column name or number from first table)[3] ) + meantime, assay))

2 REPLIES 2

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

Consider this approach. It will create the column values as desired, but will not be dynamic. If the first table is updated, it will not update the values in dttest. If this is not a requirement, then set each value can be a flexible command to introduce values and references from other tables or from inside variables.

dttest << New Column( "Test 1",

<<seteachvalue(random normal( (slope* column(first table global, column name or number from first table)[1]) + meantime, assay ))

);

dttest << New Column( "Test 2",

<<seteachvalue(random normal ( (slope * column(first table global, column name or number from first table)[2]) + meantime, assay))

);

dttest << New Column( "Test 3",

<<seteachvalue(random normal ( (slope *column(first table global, column name or number from first table)[3] ) + meantime, assay))

Highlighted
##

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

Re: Rows from table as part of formula for columns in a different table

This works well, thanks so much