Cómo bucle de tablas tabuladas e imágenes en diapositivas pptHola, estoy un poco atascado y teniendo problemas con el bucle JMP. ¿Cómo puedo hacer un bucle en una tabla tabulada que proviene de mis tablas de subconjunto? El número de tablas puede cambiar, así que pensé que necesitaba hacer un bucle (pero estoy teniendo dificultades). También necesito estas imágenes adjuntas a las diapositivas de PowerPoint. No tengo idea de cómo obtener el nombre de la variable en bucle y agregarlo a las diapositivas.
Aquí está mi script de muestra, pero no tiene ningún bucle. ¿Es posible?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Sex << Set Name( "Sex_Subset" );
dt << New Column( "Sex", Formula(:Sex_Subset));
dt1 = dt << Subset( By( :Sex_Subset ), All rows, Selected columns only( 0 ) );
//this is where to loop tabulated tables since column values used in subsetting dt may change number of values
//how to loop this according to data table name? is that possible?
dt_Tab = Tabulate(
Add Table(
Column Table( Grouping Columns( :Sex ), Analysis Columns( :height ) ),
Row Table( Grouping Columns( :name, :age ) )
)
);
tab = dt_Tab << get picture; //variable name needs to be looped? for ppt slides
//after getting the plot as image, how can I append those images that were loop to ppt slides?
//for male table
hbppt1 = H List Box(tab) << get picture;
ppt1 = Outline Box( "Male", hbppt1 );
ppt1 << savepresentation( pathppt, append, PNG );
//for female table
hbppt2 = H List Box(tab2) << get picture;
ppt2 = Outline Box( "Female", hbppt2 );
ppt2 << savepresentation( pathppt, append, PNG );
tablas del subconjunto
Automatización y secuencias de comandosRe: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptSi usa Subset con By, obtendrá una lista de tablas que luego podrá recorrer
dt1 = {DataTable("Sex_Subset=F"), DataTable("Sex_Subset=M")};
Editar:
Verifique el índice de scripts para sus funciones y mensajes que está utilizando, algunos de ellos son incorrectos
Names Default To Here(1);
pathppt = "$TEMP/bigclass.pptx";
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "Sex") << Set Name("Sex_Subset");
dt << New Column("Sex", Formula(:Sex_Subset));
dt_subsets = dt << Subset(By(:Sex_Subset), All rows, Selected columns only(0));
For Each({dt_subset}, dt_subsets,
subset_tab = dt_subset << Tabulate(
Add Table(
Column Table(Grouping Columns(:Sex), Analysis Columns(:height)),
Row Table(Grouping Columns(:name, :age))
)
);
tab_pic = subset_tab << get picture;
subset_tab << Close Window;
name_dt = dt_subset << get name;
Close(, no save);
hbppt = H List Box(tab_pic) << get picture;
ppt = Outline Box(name_dt, hbppt);
If(!File Exists(pathppt),
ppt << savepresentation(pathppt);
, // append only if file already exists
ppt << savepresentation(pathppt, append);
);
);
Open(pathppt);Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptAquí hay una reelaboración de su guión que crea las diapositivas.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Specify the path to save the pptx's to
pathPPT = "$TEMP/UserID16644Slides.pptx";
:Sex << Set Name( "Sex_Subset" );
dt << New Column( "Sex", Formula( :Sex_Subset ) );
// Add value labels so the full value can be used for the slide title
dt:Sex_Subset << Value Labels( {"F" = "Female", "M" = "Male"} ) << Use Value Labels( 1 );
// Subset the tables. The dataTableList will contain a reference to each table created
dataTableList = dt << Subset( By( :Sex_Subset ), All rows, Selected columns only( 0 ) );
// Loop across all of the tables and create the Tabulates
For Each( {table, i}, dataTableList,
dt_Tab = table << Tabulate(
Add Table(
Column Table( Grouping Columns( :Sex ), Analysis Columns( :height ) ),
Row Table( Grouping Columns( :name, :age ) )
)
);
// Pull the subset name from the data table name
theTitle = Word( 3, Char( dataTableList[i] ), "\!"=" );
// Create the new slide
hbppt1 = H List Box( dt_tab << get picture);
ppt1 = Outline Box( theTitle, hbppt1 );
// The pptx must exist for the append to be used, so on the first
// slide it is not appended
if(i==1,
ppt1 << savepresentation( pathppt,"PNG" ),
ppt1 << savepresentation( pathppt, Append,"PNG" )
);
);
// Open the powerpoint presentation to see the results
open(pathppt);
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptTodavía no tengo JMP 16, intenté convertir el bucle For Each en bucle For pero no obtengo ningún resultado.
For (i = 1, i <= dataTableList, i++,
dt_Tab = table << Tabulate(
Add Table(
Column Table( Grouping Columns( :Sex ), Analysis Columns( :height ) ),
Row Table( Grouping Columns( :name, :age ) )
)
);
);
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptHola, intenté convertir el bucle For Each a For pero no obtengo resultado.
For (i = 1, i <= dt_subsets, i++,
subset_tab = dt_subset << Tabulate(
Add Table(
Column Table(Grouping Columns(:Sex), Analysis Columns(:height)),
Row Table(Grouping Columns(:name, :age))
)
);
);
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptdt_subsets es una lista JMP.lo que necesitas es la cantidad de elementos en la lista.
For (i = 1, i <= N Items( dt_subsets ), i++,
subset_tab = dt_subset << Tabulate(
Add Table(
Column Table(Grouping Columns(:Sex), Analysis Columns(:height)),
Row Table(Grouping Columns(:name, :age))
)
);
);
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptVeo. Además, ¿me pregunto de dónde vino dt_subset?

Porque cuando probé esta línea de código, dt_subset ( dt_subset << Tabular() )no se encuentra. Sin embargo, intenté reemplazarlo con dt_subsets, tabuló las tablas 2x (2 tablas tabuladas para hombres y 2 para mujeres)
For (i = 1, i <= N Items( dt_subsets ), i++,
subset_tab = dt_subset << Tabulate(
Add Table(
Column Table(Grouping Columns(:Sex), Analysis Columns(:height)),
Row Table(Grouping Columns(:name, :age))
)
);
);
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptNecesita ser
For (i = 1, i <= N Items( dataTableList ), i++,
Re: Cómo enlazar tablas tabuladas e imágenes en diapositivas pptLa variable
subconjunto_dt
es un error, tiene que ser
subconjuntos dt