Hola a todos,
Quiero escribir el "Por" en una llamada a la función de Pareto.Noto que los diagramas de Pareto trazados "Por" algo se ven así:
Pareto Plot(Cause( :SBIN_NAM ), X( :Insertion ), Where( :lot_id == "4LU31HFN00_E95029" ))
El "Dónde" implementa el campo "Por" del cuadro de diálogo de la función Pareto.
Entonces, tengo un script JMP donde quiero trazar diagramas de Pareto por una columna llamada "lot_id".Sin embargo, quiero que el script sea general, así que no sé cuáles serán los "lot_id" de antemano.Por lo tanto, los valores que se pasan a "Dónde", se determinan en tiempo de ejecución por cualquier lot_id que exista realmente en la tabla de datos.
Al principio, creé una lista de todos los lot_id llamados "listOfLotIDs" en la tabla de datos y probé el enfoque de sentido común.Esto no funcionó:
For( i = 1, i <= N Items( listOfLotIDs ), i++,
Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == listOfLotIDs[i] ));
);
Después de un tiempo llegué a creer que mi código no funcionaba porque, por alguna razón que perdí para mí, el valor pasado a la función "Dónde" debe definirse entre paréntesis con comillas reales - no puede simplemente pasarle una variable de cadena.Entonces, probé otra variante:
For( i = 1, i <= N Items( listOfLotIDs ), i++,
sEval = "Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"" || listOfLotIDs[i] || "\!"))";
eval(Parse(sEval));
print("PRINT OUTPUT: " || sEval);
);
Creo que la función "parse" compila un script JMP y la función "eval" ejecuta un fragmento de script JMP compilado. Sin embargo, esto TAMBIÉN no funciona.Incluí la impresión () de la cadena solo para asegurarme de que estaba ensamblando la cadena correctamente.Esto es lo que dice el registro:
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFN00_E95029-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFN00_E95029\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFO00_E93847-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFO00_E93847\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFP00_E93981-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFP00_E93981\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFQ00_E95030-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFQ00_E95030\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFR00_E94699-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFR00_E94699\!"))"
Entonces, ¿qué demonios está mal?¿Cómo se convirtieron mis comillas de escape (\! ") En guiones" - "?Por favor ayuda.
Por cierto, el foro afirma que eliminó el "HTML inválido" del cuerpo de mi mensaje, solo tenga cuidado, algunos de los códigos o mensajes de error pueden estar distorsionados.