Subscribe Bookmark RSS Feed

Suppressing output

I'm running a cluster analysis in which I want to feed in all the columns of my data table DT2WAY into the analysis, perform the analysis and then append the resulting allocation into 4 clusters to the right of that table, but without seeing any output. The following script does that for me, but leaves a dendrogram on the screen. Obviously I can simply delete it immediately afterwards, but I'd much prefer to suppress it altogether. How can I do that, please?


style="font-size: 8pt; font-family: "Courier New"; color: black;">



 





style="font-size: 8pt; font-family: "Courier New"; color: black;">Ylist

style="font-size: 8pt; font-family: "Courier New"; color: navy;">=

style="font-size: 8pt; font-family: "Courier New"; color: black;">
{}

style="font-size: 8pt; font-family: "Courier New"; color: navy;">;

style="font-size: 8pt; font-family: "Courier New"; color: black;">

style="font-size: 8pt; font-family: "Courier New"; color: rgb(0, 0, 221);">for

style="font-size: 8pt; font-family: "Courier New"; color: black;">(

style="font-size: 8pt; font-family: "Courier New"; color: black;">i

style="font-size: 8pt; font-family: "Courier New"; color: navy;">=

style="font-size: 8pt; font-family: "Courier New"; color: teal;">1

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">
i

style="font-size: 8pt; font-family: "Courier New"; color: navy;"><=

style="font-size: 8pt; font-family: "Courier New"; color: rgb(0, 0, 221);">ncol

style="font-size: 8pt; font-family: "Courier New"; color: black;">(

style="font-size: 8pt; font-family: "Courier New"; color: black;">dt2way)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">
i

style="font-size: 8pt; font-family: "Courier New"; color: navy;">++,

style="font-size: 8pt; font-family: "Courier New"; color: black;">

style="font-size: 8pt; font-family: "Courier New"; color: rgb(0, 0, 221);">insert
into

style="font-size: 8pt; font-family: "Courier New"; color: black;">(

style="font-size: 8pt; font-family: "Courier New"; color: black;">Ylist

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">

style="font-size: 8pt; font-family: "Courier New"; color: rgb(0, 0, 221);">column

style="font-size: 8pt; font-family: "Courier New"; color: black;">(

style="font-size: 8pt; font-family: "Courier New"; color: black;">dt2way

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">
ColName[i])))

style="font-size: 8pt; font-family: "Courier New"; color: navy;">;

style="font-size: 8pt; font-family: "Courier New"; color: black;">





style="font-size: 8pt; font-family: "Courier New"; color: black;">

 





style="font-size: 8pt; font-family: "Courier New"; color: black;">dt2way

style="font-size: 8pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 8pt; font-family: "Courier New"; color: black;">
Hierarchical
Cluster(





style="font-size: 8pt; font-family: "Courier New"; color: black;">
style="">      
Y(

style="font-size: 8pt; font-family: "Courier New"; color: rgb(0, 0, 221);">eval
list

style="font-size: 8pt; font-family: "Courier New"; color: black;">(

style="font-size: 8pt; font-family: "Courier New"; color: black;">Ylist)
)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">





style="font-size: 8pt; font-family: "Courier New"; color: black;">
style="">      
Method(

style="font-size: 8pt; font-family: "Courier New"; color: purple;">"Ward"

style="font-size: 8pt; font-family: "Courier New"; color: black;">
)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">





style="font-size: 8pt; font-family: "Courier New"; color: black;">
style="">      
Standardize(

style="font-size: 8pt; font-family: "Courier New"; color: teal;">1

style="font-size: 8pt; font-family: "Courier New"; color: black;">
)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">





style="font-size: 8pt; font-family: "Courier New"; color: black;">
style="">      
Number
of Clusters(

style="font-size: 8pt; font-family: "Courier New"; color: teal;">4

style="font-size: 8pt; font-family: "Courier New"; color: black;">
)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">,

style="font-size: 8pt; font-family: "Courier New"; color: black;">





style="font-size: 8pt; font-family: "Courier New"; color: black;">
style="">      
Save
Clusters





style="font-size: 8pt; font-family: "Courier New"; color: black;">)

style="font-size: 8pt; font-family: "Courier New"; color: navy;">;

style="font-size: 8pt; font-family: "Courier New"; color: black;">



3 REPLIES
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

David,

Try the Invisible keyword.

dt2way << Hierarchical Cluster(
Y( eval list(Ylist) ),
Method( "Ward" ),
Standardize( 1 ),
Number of Clusters( 4 ),
Save Clusters,
Invisible
);
-Jeff
Hi Jeff - that's perfect - many thanks!

Two quick additional questions, if I may:

(a) Is the "Invisible" keyword available for every platform?

(b) Do I need to delete anything afterwards? That is, am I creating objects that I can't see (and which therefore really ought to be deleted simply for the sake of keeping a tidy workspace), or does using the "Invisible" option prevent the window from created in the first place?

David
mpb

Super User

Joined:

Jun 23, 2011

From the JMP 8 docs:

Platform launches have an invisible option, which suppresses the showing of the window. Using this option on a Fit Model script suppresses both the model dialog and the results window.

When using this option, be careful to keep track of the window in the script and close it when the script is done with it, because the invisible windows use resources that must be manually freed.