Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Using Row offsets to reshape a data table

- 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 29, 2015 2:01 PM
(298 views)

Hi,

I am trying to clean up a data table from a fairly messing format.

I am trying to create a single column with the relevant data since the input file has multiple delimiters. I am using c000004 as the column for the data I would like to keep.

Some of the data lines have two values in the same row and I am trying to copy them to a single column which entails offsetting the row index.

The first four lines work as intended, but the last one does not. I am looking for a value in c000002 and if true copy a value from column6, but one row down.

:c000004<<**set each value****(**if**(**Munger**(**:c000002,**1**,"clamp"**)**>**0**, :c000003,:c000004**))**;

:c000004<<**set each value****(**if**(**Munger**(**:c000002,**1**,"rot"**)**>**0**, :c000005,:c000004**))**;

:c000004<<**set each value****(**if**(**Munger**(**:c000002,**1**,"locY"**)**>**0**, :c000007,:c000004**))**;

:c000004<<**set each value****(**if**(**Munger**(**:c000002,**1**,"height"**)**>**0**, :c000005,:c000004**))**;

:c000004<<**set each value****(**If**(**Munger**(**:c000002,**1**,"locX"**)**>**0**, :c000006**[**Row**()**+**1****]**,:c000004**))**;

The log file is not overly clarifying

**:c000004 << set each value(**

**If( Munger( :c000002, 1, "locY" ) > 0,**

**:c000007,**

**:c000004**

**)**

**);**

**:c000004 << set each value(**

**If( Munger( :c000002, 1, "height" ) > 0,**

**:c000005,**

**:c000004**

**)**

**);**

**:c000004 << set each value(**

**If( Munger( :c000002, 1, "locX" ) > 0,**

**:c000006[Row() + 1],**

**:c000004**

**)**

**) /*###*/;**

**What should I use to get the row offset into a new column?**