How to use JMP script to generate a table with duplicate dataHow to use JMP script to generate a table with duplicate data, list below...
kindly su
| Before | | | | After |
| Name | Shift | | | | Name | Shift |
| John | ShiftA | ------>' | John | ShiftA |
| Kevin | ShiftB | | | | Kevin | ShiftB |
| Tom | ShiftC | | | | Tom | ShiftC |
| Tim | ShiftD | | | | Tim | ShiftD |
| Lily | ShiftE | | | | Lily | ShiftE |
| Jessica | ShiftF | | | | Jessica | ShiftF |
| | | | | | John | ShiftA |
| | | | | | Kevin | ShiftB |
| | | | | | Tom | ShiftC |
| | | | | | Tim | ShiftD |
| | | | | | Lily | ShiftE |
| | | | | | Jessica | ShiftF |
| | | | | | John | ShiftA |
| | | | | | Kevin | ShiftB |
| | | | | | Tom | ShiftC |
| | | | | | Tim | ShiftD |
| | | | | | Lily | ShiftE |
| | | | | | Jessica | ShiftF |
| | | | | | John | ShiftA |
| | | | | | Kevin | ShiftB |
| | | | | | Tom | ShiftC |
| | | | | | Tim | ShiftD |
| | | | | | Lily | ShiftE |
| | | | | | Jessica | ShiftF |
| | | | | | John | ShiftA |
| | | | | | Kevin | ShiftB |
| | | | | | Tom | ShiftC |
| | | | | | Tim | ShiftD |
| | | | | | Lily | ShiftE |
| | | | | | Jessica | ShiftF |
Automation and ScriptingMass CustomizationRe: How to use JMP script to generate a table with duplicate dataNice! if you want N copies rather than doubling the size N times, you can start with an empty table like this:
dt = Current Data Table();
Ntimes = 5;
dtnew = New Table();
For( i = 1, i <= Ntimes, i++,
dtnew << Concatenate( dt, Append to first table( 1 ) )
);
The empty table is special when first created: it appears to have a column named "Column 1", but that column is a placeholder that will vanish if not used.
Doubling with Tom's answer is much faster if you need a lot of copies. 10 doubles in 0.02 sec or 1024 copies in 0.50 sec.
@chungwei
Re: How to use JMP script to generate a table with duplicate dataTry this:
dt = Current Data Table();
Ntimes = 5;
for(i=1,i<=Ntimes,i++,
dt << Concatenate (dt, Append to first table(1));
);