cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
frankderuyck
Level VII

Transform a time column into a time interval column

In my data table I have a categorical variable with ID settings that are time functions. I would like to use the functional data explorer to study the ID time functions; however the starting time of each ID setting is not constant. To use the FDE time intervals of each ID must be scaled starting from time = 0. How can I transform my time column into a time interval column so each ID setting starts at 0? Thanks for input.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Transform a time column into a time interval column

Thanks for the data file. Here are steps to accomplish this:

  1. Right click Time column, select New Formula Column...Aggregate...Minimum
  2. Right click new column, select Formula, change formula to include ID as a "By" variable (third argument)
    1. Jed_Campbell_0-1677099313205.png

       

  3. Rename this column to "Start Point"
  4. Select both Time and Start Point columns, right click on column header, select New Column Formula...Combine...Difference

I added 2 files to show this: a workflow if you're on JMP 17, and the data table with script saved if you're on JMP < 17. 

View solution in original post

10 REPLIES 10

Re: Transform a time column into a time interval column

Without knowing how your categorical variable is formatted, it's difficult to suggest a solution. However, assuming that there is at least some numeric value in the column that can be extracted, you could use the Rank() function to scale things. I've attached a sample table to show how the formulas work.

Jed_Campbell_0-1677080599338.png

 

frankderuyck
Level VII

Re: Transform a time column into a time interval column

Thanks for input! Where do I find the formula Last?

Re: Transform a time column into a time interval column

If you right click a column header then select New Formula Column, you'll see a list of the formulas that JMP will automatically make for you. For me, this is about 90% of all the formulas I build in JMP. To make the formula columns in the sample table, I used this, then modified the formulas a bit in the formula editor.

Jed_Campbell_1-1677083955569.png

To use the formula editor, right click on the header and select Formula. There, you'll see a searchable list of all the possible formulas on the left. 

Jed_Campbell_0-1677083709484.png

 

frankderuyck
Level VII

Re: Transform a time column into a time interval column

Hi Jed, maybe it is better to specify with an example in attached data table what I need: in the example there are 3 ID settings ;next to there is a time column in seconds. In the time interval column, for each ID setting I need a time scale tarting from 0. How do I do this in JMP? Thanks in advance for help, I need to do this for 80 data files that will concatenated with each 3 to 10 ID settings.

Re: Transform a time column into a time interval column

Thanks for the data file. Here are steps to accomplish this:

  1. Right click Time column, select New Formula Column...Aggregate...Minimum
  2. Right click new column, select Formula, change formula to include ID as a "By" variable (third argument)
    1. Jed_Campbell_0-1677099313205.png

       

  3. Rename this column to "Start Point"
  4. Select both Time and Start Point columns, right click on column header, select New Column Formula...Combine...Difference

I added 2 files to show this: a workflow if you're on JMP 17, and the data table with script saved if you're on JMP < 17. 

frankderuyck
Level VII

Re: Transform a time column into a time interval column

Thanks a lot Jed, this works fine!

Re: Transform a time column into a time interval column

Have you considered the data processing capabilities built into FDE?

frankderuyck
Level VII

Re: Transform a time column into a time interval column

Hi Mark, maybe it is better to specify with an example in attached data table what I need: in the example there are 3 ID settings ;next to there is a time column in seconds. In the time interval column, for each ID setting I need a time scale tarting from 0. How do I do this in JMP? Thanks in advance for help, I need to do this for 80 data files that will concatenated with each 3 to 10 ID settings.

Re: Transform a time column into a time interval column

Thanks for sharing the example. The data processing tools in FDE won't help this case.

Recommended Articles