Come eseguire il loop di tabelle e immagini tabulate in diapositive pptCiao, sono un po' bloccato e ho difficoltà nel looping di JMP. Come posso eseguire il loop di una tabella tabulata proveniente dalle mie tabelle di sottoinsiemi? Il numero di tabelle potrebbe cambiare, quindi ho pensato che dovevo eseguire il looping (ma ho difficoltà), inoltre ho bisogno che queste immagini vengano aggiunte alle diapositive di PowerPoint. Non ho idea di come ottenere il nome della variabile in loop e aggiungerlo alle diapositive.
Ecco il mio script di esempio, ma non ha alcun loop. È possibile?
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 );
tabelle dal sottoinsieme
Automazione e scriptingRe: Come inserire tabelle e immagini tabulate in diapositive pptSe usi Subset con By, otterrai un elenco di tabelle su cui potrai quindi eseguire il loop
dt1 = {DataTable("Sex_Subset=F"), DataTable("Sex_Subset=M")};
Modificare:
Controlla l'indice degli script per le funzioni e i messaggi che stai utilizzando, alcuni di essi non sono corretti
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: Come inserire tabelle e immagini tabulate in diapositive pptEcco una rielaborazione del tuo script che crea le diapositive

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: Come inserire tabelle e immagini tabulate in diapositive pptNon ho ancora JMP 16, ho provato a convertire il ciclo For Each in ciclo For ma non ottengo alcun output
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: Come inserire tabelle e immagini tabulate in diapositive pptCiao, ho provato a convertire il ciclo For Each in For ma non ho ottenuto alcun output
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: Come inserire tabelle e immagini tabulate in diapositive pptdt_subsets è un elenco JMP.ciò di cui hai bisogno è il numero di elementi nell'elenco.
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: Come inserire tabelle e immagini tabulate in diapositive pptVedo. Inoltre, mi chiedevo solo da dove provenisse dt_subset?

Perché mentre provavo questa riga di codice, dt_subset ( dt_subset <<TABELLA> )non si trova. Tuttavia, ho provato a sostituirlo con dt_subsets, tabulando le tabelle 2x (2 tabelle tabulate per uomini e 2 per donne)</TABELLA>
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: Come inserire tabelle e immagini tabulate in diapositive pptDeve esserlo
For (i = 1, i <= N Items( dataTableList ), i++,
Re: Come inserire tabelle e immagini tabulate in diapositive pptLa variabile
dt_sottoinsieme
è un errore, deve esserlo
dt_sottoinsiemi