Re: formulaAquí está la fórmula que se me ocurrió, que parece funcionar.
If( Row() == 1,
value = 1;
counter = 1;
);
If( :X__1 != Lag( :X__1 ),
counter = 1;
While( :X__1 == :X__1[Row() + counter] | Row() + counter == N Rows( Current Data Table() ), counter++ );
value = counter;
,
value = .
);
value;
Re: formulaHola,
esto funciona muy bien!
¿Podría explicarme qué significa esto?
If (: X__1! = Lag (: X__1),
...
contador = 1; Mientras que (: X__1 ==: X__1 [Fila () + contador] | Fila () + contador == N filas (tabla de datos actual ()), contador ++);
valor = contador;
,
valor =.
);
valor;
¿Dónde puedo leer o aprender al respecto?
¡Muchas gracias!
Re: formulaToda la información sobre las funciones y declaraciones en la secuencia de comandos en cuestión se puede encontrar en la Guía de secuencias de comandos disponible en el menú desplegable Ayuda
Ayuda ==> JMP Documentation Library Scripting Guide
Espero que lo siguiente ayude a comprender la fórmula
// The entire script will be run for each row in the
// in the data table
// On row 1 set default values
If( Row() == 1,
value = 1;
counter = 1;
);
// If the value of X__1 has changed check to see if
// more than one row has this new value of X__1
If( :X__1 != Lag( :X__1 ),
counter = 1;
While(
:X__1 == :X__1[Row() + counter]
|
Row() + counter == N Rows( Current Data Table() ),
counter
++);
value = counter;
,
// If this is not a row that has a new value of X__1
// then set the value to a missing value
value = .
);
// A JMP formula always takes the results of the last item
// processed, and makes that the value for the formula
// columns current row so by placing the variable that
// holds that value as the last item processed in the
// script, we ensure the correct value is placed into
// the data table
value;
fórmulaHola,
Quiero calcular a partir de un archivo la longitud de las sucesivas series de cada individuo.
¿Cómo puedo calcular esto en JMP Pro con la fórmula?
A mano ya he introducido algunas secuencias en la secuencia de columnas.
X_4 = secuencia
Gracias.