cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-777741%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERecorre%20los%20informes%20y%20extrae%20el%20t%C3%ADtulo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777741%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EHola%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EEstoy%20intentando%20recorrer%20todos%20los%20informes%20generados%20a%20partir%20de%20un%20ANOVA%20oneway.%20Creo%20una%20lista%20de%20los%20informes%20%3CEM%3Eanova_list.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ESi%20intento%20extraer%20manualmente%20el%20t%C3%ADtulo%20de%20un%20informe%20con%20la%20siguiente%20sintaxis%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CEM%3Ecurr_anova%20%3D%20lista_anova%5B1%5D%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3Ereport_title%20%3D%20curr_anova%20%26lt%3B%26lt%3B%20informe%20%26lt%3B%26lt%3B%20obtener%20t%C3%ADtulo(%22cadena%22)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Eel%20resultado%20es%20lo%20que%20espero%3A%20alguna%20variaci%C3%B3n%20de%3A%20%3CEM%3EAn%C3%A1lisis%20unidireccional%20de%20Y%20por%20X%20by1%3Dby1val%20by2%3Dby2val...%3C%2FEM%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EPero%20cuando%20intento%20hacer%20esto%20en%20un%20bucle%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CEM%3Epara%20(i%20%3D%201%2C%20i%26lt%3B%3D%20n%20elementos%20(anova_list)%2C%20i%2B%2B%2C%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3Ecurr_anova%20%3D%20lista_anova%5Bi%5D%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3Ereport_title%20%3D%20curr_anova%20%26lt%3B%26lt%3B%20informe%20%26lt%3B%26lt%3B%20obtener%20t%C3%ADtulo(%22cadena%22)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ela%20salida%20de%20%3CEM%3Ereport_title%3C%2FEM%3E%20es%20%3CEM%3EDisplayBox%5BOutlineBox%5D.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%C2%BFEstoy%20descuidando%20la%20sintaxis%3F%20Prob%C3%A9%20diferentes%20combinaciones%20de%20evaluaciones%20para%20ver%20si%20la%20salida%20cambia%2C%20sin%20%C3%A9xito.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-777741%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAn%C3%A1lisis%20y%20modelado%20de%20datos%20b%C3%A1sicos%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eventanas%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Recorrer%20informes%20y%20extraer%20t%C3%ADtulo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIntenta%20cambiar%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ereport_title%20%3D%20curr_anova%20%26lt%3B%26lt%3B%20report%20%26lt%3B%26lt%3B%20get%20%20title(%22string%22)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3Ea%20(los%20par%C3%A9ntesis%20son%20los%20m%C3%A1s%20importantes)%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ereport_title%20%3D%20(curr_anova%20%26lt%3B%26lt%3B%20report)%20%26lt%3B%26lt%3B%20get%20%20title%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Recorrer%20informes%20y%20extraer%20t%C3%ADtulo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ejthi%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EGracias%20por%20la%20sugerencia.%20%C2%A1Esto%20realmente%20funciona!%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%C2%BFPuedo%20preguntar%20por%20qu%C3%A9%20esto%20es%20diferente%3F%20%C2%BFQu%C3%A9%20hace%20la%20contenci%C3%B3n%20entre%20par%C3%A9ntesis%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777754%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Recorrer%20informes%20y%20extraer%20t%C3%ADtulo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777754%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESu%20versi%C3%B3n%20original%20cre%C3%B3%20una%20'cascada%20de%20mensajes%3A'%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eresult%20%3D%20obj%20%26lt%3B%26lt%3B%20message%201%20%26lt%3B%26lt%3B%20message%202%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EEl%20resultado%20es%20de%20la%20sucesi%C3%B3n%20de%20mensajes%20hacia%20un%20mismo%20objeto.%20El%20uso%20de%20par%C3%A9ntesis%20env%C3%ADa%20el%20segundo%20mensaje%20al%20resultado%20de%20enviar%20el%20primer%20mensaje.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
doctorfizz
Level II

Loop through reports and extract title

Hello,

 

I am trying to loop through all reports generated from an ANOVA-oneway. I create a list of the reports anova_list. 

 

If I manually try to extract the title from a report with the following syntaxt

 

curr_anova = anova_list[1] 

report_title = curr_anova << report << get  title("string")

 

the output is what I expect - some variation of: Oneway Analysis of Y by X by1=by1val by2=by2val ...

 

But when I try to do this in a loop

 

for(i = 1, i<= n items(anova_list), i++,

curr_anova = anova_list[i] 

report_title = curr_anova << report << get  title("string")

)

 

the output of report_title is DisplayBox[OutlineBox].

 

Am I making an oversight on the syntax? I have tried different combinations of evals to see if the output change, to no avail. 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Loop through reports and extract title

Try changing

report_title = curr_anova << report << get  title("string")

 

to (the brackets being the most important)

 

report_title = (curr_anova << report) << get  title;
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Loop through reports and extract title

Try changing

report_title = curr_anova << report << get  title("string")

 

to (the brackets being the most important)

 

report_title = (curr_anova << report) << get  title;
-Jarmo
doctorfizz
Level II

Re: Loop through reports and extract title

jthi,

 

thanks for the suggestion. This indeed does the trick! 

 

May I ask why this is different? What does the containment with parenthesis do? 

Re: Loop through reports and extract title

Your original version created a 'message cascade:"

result = obj << message 1 << message 2;

The result is from the succession of messages to the same object. Using the parentheses sends the second message to the result of sending the first message.

Recommended Articles