¿Cuál es la mejor manera de actualizar el valor de la nueva variable de tabla dentro de una función?En este momento, lo estoy haciendo como se muestra a continuación. Sin embargo, descubrí que esta variable Días no se actualizará y creará una nueva variable llamada Días 2.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Table Variable( "Days", 42 ); // In original data table, Days set to default which is 42
// assume below is a new function, and I'm passing dt as input and I want to update the Days variable
myFunction = Function ({dt},
// I want this Days variable get updated with new value below, 100
dt << New Table Variable ( "Days", 100);
dt << Select Where( :Name( "sex" ) == "F" );
dt << Subset( Copy formula( 1 ), Suppress formula evaluation( 0 ), Selected Rows( 1 ), Selected columns only( 0 ) );
dt = Data Table (Current Data Table() << Get Name());
);
myFunction(dt)