<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Distribution Bin in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Distribution-Bin/m-p/1415#M1415</link>
    <description>You might be interested in exploring several histogram options described in &lt;BR /&gt;Options for Continuous Variables in the Univariate Analysis section of the Statistics and Graphics guide.&lt;BR /&gt;&lt;BR /&gt;Shadowgram and Set Bin Width allow some control options on the histogram.&lt;BR /&gt;&lt;BR /&gt;Under the red triangle, the Histogram Options also has options for Show Counts and Show Percents.&lt;BR /&gt;&lt;BR /&gt;An option for displaying the bin edges or cut-points would be interesting.&lt;BR /&gt;&lt;BR /&gt;I've forgotten where I found the following script but it produces a nifty interactive tool for defining cut-points.&lt;BR /&gt;&lt;BR /&gt;// ian.cox@jmp.com: 27Aug09&lt;BR /&gt;&lt;BR /&gt;// Current table&lt;BR /&gt;if(IsEmpty(Current Data Table()), dt = Open(), dt = Current Data Table());&lt;BR /&gt;dtn = dt &amp;lt;&amp;lt; GetName;&lt;BR /&gt;nr = NRow(dt);&lt;BR /&gt;nc = NCol(dt);&lt;BR /&gt;&lt;BR /&gt;// Miscellaneus&lt;BR /&gt;lbWidth = 130;&lt;BR /&gt;notImplemented = Expr(Dialog("Feature Not Implemented Yet",Button("OK")));&lt;BR /&gt;helpScript = Expr(Dialog("Quantises a Continuous variable onto an Ordinal variable 'by eye'",Button("OK")));&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// Build custom dialog in a window&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;customDlg = &lt;BR /&gt;NewWindow("Cut-Points Using "||dtn,&lt;BR /&gt;	BorderBox(left(3),top(2),&lt;BR /&gt;	VListBox(&lt;BR /&gt;		HlistBox(&lt;BR /&gt;			PanelBox("Select Column", &lt;BR /&gt;				colListData=ColListBox(All,width(lbWidth),nLines(min(nc,10)))&lt;BR /&gt;				),&lt;BR /&gt;			PanelBox("Cast Selected Columns into Role",&lt;BR /&gt;				LineUpBox(NCol(2), Spacing(3),&lt;BR /&gt;					ButtonBox("Cut-Points",colListOR &amp;lt;&amp;lt; Append(colListData&amp;lt;&lt;GETSELECTED&gt;&lt;/GETSELECTED&gt;					colListOR = ColListBox(width(lbWidth),nLines(1),Numeric)&lt;BR /&gt;					)&lt;BR /&gt;				),&lt;BR /&gt;			PanelBox("Action",&lt;BR /&gt;				LineupBox(NCol(1),&lt;BR /&gt;					ButtonBox("OK", OKScript),&lt;BR /&gt;					ButtonBox("Cancel", customDlg&amp;lt;&lt;CLOSEWINDOW&gt;&lt;/CLOSEWINDOW&gt;					TextBox(" "),&lt;BR /&gt;					ButtonBox("Remove", colListOR &amp;lt;&amp;lt; RemoveSelected),&lt;BR /&gt;					ButtonBox("Recall", notImplemented),&lt;BR /&gt;					ButtonBox("Help", helpScript))&lt;BR /&gt;				)&lt;BR /&gt;			)				// End of HListBox&lt;BR /&gt;		)					// End of VListBox&lt;BR /&gt;	)						// End of BorderBox&lt;BR /&gt;);							// End of NewWindow&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// When the user hits OK . . .&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;OKScript = Expr(&lt;BR /&gt;&lt;BR /&gt;customDlg &amp;lt;&amp;lt; CloseWindow;&lt;BR /&gt;&lt;BR /&gt;// Get values from the Dialog&lt;BR /&gt;colOR = colListOR &amp;lt;&amp;lt; GetItems;&lt;BR /&gt;&lt;BR /&gt;// Are the user selections viable?&lt;BR /&gt;if (NItems(colOR) != 1, Dialog("ERROR: You must select a Cut-Points Column", Button("OK")); Throw());&lt;BR /&gt;&lt;BR /&gt;// Column name&lt;BR /&gt;colORn = colOR[1];&lt;BR /&gt;&lt;BR /&gt;// Column reference&lt;BR /&gt;colOR = Column(dt, colORn);&lt;BR /&gt;&lt;BR /&gt;// Get a distribution&lt;BR /&gt;// NB: We use the "SubstituteInto" design pattern because we need to update the Dispatch message&lt;BR /&gt;d = Expr(&lt;BR /&gt;		dist = dt &amp;lt;&amp;lt; Distribution(&lt;BR /&gt;								Continuous Distribution(&lt;BR /&gt;									Column(colOR),&lt;BR /&gt;									Quantiles(0),&lt;BR /&gt;									Moments(0),&lt;BR /&gt;									Vertical(0),&lt;BR /&gt;									OutlierBoxPlot(0)&lt;BR /&gt;								),&lt;BR /&gt;								SendToReport(&lt;BR /&gt;									Dispatch(&lt;BR /&gt;										{"colTBD"},&lt;BR /&gt;										"Distrib Histogram",&lt;BR /&gt;										FrameBox,&lt;BR /&gt;										FrameSize(500, 300)&lt;BR /&gt;									)&lt;BR /&gt;								)&lt;BR /&gt;							)&lt;BR /&gt;		);&lt;BR /&gt;SubstituteInto(d, "colTBD", colORn);&lt;BR /&gt;d;&lt;BR /&gt;&lt;BR /&gt;// Get the report&lt;BR /&gt;distRep = Report(dist);&lt;BR /&gt;&lt;BR /&gt;// Add mose instructions and an OK button for when the cut points have been defined&lt;BR /&gt;pb = PanelBox("Define Cut-Points ");&lt;BR /&gt;tb1 = TextBox("Click once in the graphics frome to define a new cut-point. ");&lt;BR /&gt;tb2 = TextBox("Select 'OK' when you have defined all cut-points.\!N ");&lt;BR /&gt;bb = ButtonBox("OK", OKScript2);&lt;BR /&gt;pb &amp;lt;&amp;lt; Append(tb1) &amp;lt;&amp;lt; Append(tb2) &amp;lt;&amp;lt; Append(bb);&lt;BR /&gt;distRep[OutlineBox(2)] &amp;lt;&amp;lt; Append(pb);&lt;BR /&gt;&lt;BR /&gt;// Expression to be called on mouse-up in the Graphics Box - Adds a red vertical line at the chosen x value&lt;BR /&gt;addVLine = Expr(			&lt;BR /&gt;				vl = Expr( distRep[FrameBox(1)] &amp;lt;&amp;lt; AddGraphicsScript(PenColor("Red"); VLine(xTBD)) );&lt;BR /&gt;				SubstituteInto(vl, Expr(xTBD), EvalExpr(x));&lt;BR /&gt;				vl&lt;BR /&gt;				);&lt;BR /&gt;&lt;BR /&gt;// Used to capture successive x values at mouse-up&lt;BR /&gt;xVals = {};&lt;BR /&gt;&lt;BR /&gt;// Add the mouse trap script to the Graphics Box&lt;BR /&gt;distRep[FrameBox(1)] &amp;lt;&amp;lt; AddGraphicsScript(&lt;BR /&gt;										MouseTrap(&lt;BR /&gt;												{},&lt;BR /&gt;												Print("At mouse up x was "||Char(Round(x,2)));&lt;BR /&gt;												InsertInto(xVals, x);&lt;BR /&gt;												addVLine;&lt;BR /&gt;												);&lt;BR /&gt;										);&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// OKScript2: Executes when all cut-points are defined and user hits OK&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;OKScript2 = Expr(&lt;BR /&gt;&lt;BR /&gt;distRep &amp;lt;&amp;lt; CloseWindow;&lt;BR /&gt;&lt;BR /&gt;// Turn list of cut-point values into a sorted vector&lt;BR /&gt;xVals2 = J(NItems(xVals), 1, .);&lt;BR /&gt;for (i=1, i&amp;lt;=NItems(xVals), i++, xVals2&lt;I&gt; = xVals&lt;I&gt;);&lt;BR /&gt;cutPoints = SortAscending(xVals2);&lt;BR /&gt;&lt;BR /&gt;// Get the data to cut&lt;BR /&gt;data = colOR &amp;lt;&amp;lt; GetValues;&lt;BR /&gt;&lt;BR /&gt;// Apply the cut points to the data by looping over the cut points . . .&lt;BR /&gt;// NB: We handle any missing values in 'data' by initialising with '.' and treating them as a special case later&lt;BR /&gt;codedData = J(nr, 1, .);&lt;BR /&gt;&lt;BR /&gt;// txt will be a list of text values describing eaach bin&lt;BR /&gt;txt = {};&lt;BR /&gt;&lt;BR /&gt;// First cut-point&lt;BR /&gt;r = Loc(data &amp;lt;= cutPoints[1]);&lt;BR /&gt;codedData&lt;R&gt; = 1;&lt;BR /&gt;InsertInto(txt, "&amp;lt;= "||Char(cutPoints[1]));&lt;BR /&gt;&lt;BR /&gt;// Remaining cut-points other than the last&lt;BR /&gt;for (cp = 2, cp &amp;lt;=NRow(cutPoints), cp++,&lt;BR /&gt;	r = Loc((data &amp;gt; cutPoints[cp-1]) &amp;amp; (data &amp;lt;= cutPoints[cp]));&lt;BR /&gt;	codedData&lt;R&gt; = cp;&lt;BR /&gt;	InsertInto(txt, Char(cutPoints[cp-1])||" - "||Char(cutpoints[cp]))&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;// Last cut-point&lt;BR /&gt;r = Loc(data &amp;gt; cutPoints[NRow(cutPoints)]);&lt;BR /&gt;codedData&lt;R&gt; = NRow(cutPoints) + 1;&lt;BR /&gt;InsertInto(txt, "&amp;gt; "||Char(cutPoints[NRow(cutPoints)]));&lt;BR /&gt;&lt;BR /&gt;// Use txt to make a text version of coded data in a new list.&lt;BR /&gt;// Loop over the data and remember to handle any issing values&lt;BR /&gt;txtData = {};&lt;BR /&gt;for (n = 1, n &amp;lt;= NRow(data), n++,&lt;BR /&gt;	if (!IsMissing(data&lt;N&gt;),&lt;BR /&gt;		InsertInto(txtData, txt[codedData&lt;N&gt;]),&lt;BR /&gt;		InsertInto(txtData, "")&lt;BR /&gt;		);&lt;BR /&gt;	);&lt;BR /&gt;&lt;BR /&gt;// Add a column to dt with the cut data&lt;BR /&gt;binnedCol = dt &amp;lt;&amp;lt; NewColumn(colORn||" Binned", Character, Ordinal, Values(txtData));&lt;BR /&gt;&lt;BR /&gt;// Apply the value order property to the new column.&lt;BR /&gt;binnedCol &amp;lt;&amp;lt; Set Property( "Value Ordering", EvalList(txt));&lt;BR /&gt;&lt;BR /&gt;// Show the distribution of the old and new columns&lt;BR /&gt;dt &amp;lt;&amp;lt; Distribution(&lt;BR /&gt;				Continuous Distribution(&lt;BR /&gt;					Column(colOR),&lt;BR /&gt;					Quantiles(0),&lt;BR /&gt;					Moments(0),&lt;BR /&gt;					OutlierBoxPlot(0)&lt;BR /&gt;				),&lt;BR /&gt;				Nominal Distribution(&lt;BR /&gt;					Column(binnedCol),&lt;BR /&gt;					Frequencies(0)&lt;BR /&gt;					)&lt;BR /&gt;			);&lt;BR /&gt;&lt;BR /&gt;);				// End of OKScript2&lt;BR /&gt;&lt;BR /&gt;);				// End of OKScript&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-Matt&lt;/N&gt;&lt;/N&gt;&lt;/R&gt;&lt;/R&gt;&lt;/R&gt;&lt;/I&gt;&lt;/I&gt;</description>
    <pubDate>Tue, 02 Mar 2010 14:43:53 GMT</pubDate>
    <dc:creator>mattf</dc:creator>
    <dc:date>2010-03-02T14:43:53Z</dc:date>
    <item>
      <title>Distribution Bin</title>
      <link>https://community.jmp.com/t5/Discussions/Distribution-Bin/m-p/1414#M1414</link>
      <description>First of all, I want to greet all the people in the community.&lt;BR /&gt;This is first time for me to use this kind of Community Tools.&lt;BR /&gt;&lt;BR /&gt;In the Distributions:&lt;BR /&gt;1) where can I see the value of the bin?&lt;BR /&gt;2) which is the formula used from JMP to calculate the bin for the firts visualization?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;Simone</description>
      <pubDate>Mon, 01 Mar 2010 17:50:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Distribution-Bin/m-p/1414#M1414</guid>
      <dc:creator />
      <dc:date>2010-03-01T17:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Distribution Bin</title>
      <link>https://community.jmp.com/t5/Discussions/Distribution-Bin/m-p/1415#M1415</link>
      <description>You might be interested in exploring several histogram options described in &lt;BR /&gt;Options for Continuous Variables in the Univariate Analysis section of the Statistics and Graphics guide.&lt;BR /&gt;&lt;BR /&gt;Shadowgram and Set Bin Width allow some control options on the histogram.&lt;BR /&gt;&lt;BR /&gt;Under the red triangle, the Histogram Options also has options for Show Counts and Show Percents.&lt;BR /&gt;&lt;BR /&gt;An option for displaying the bin edges or cut-points would be interesting.&lt;BR /&gt;&lt;BR /&gt;I've forgotten where I found the following script but it produces a nifty interactive tool for defining cut-points.&lt;BR /&gt;&lt;BR /&gt;// ian.cox@jmp.com: 27Aug09&lt;BR /&gt;&lt;BR /&gt;// Current table&lt;BR /&gt;if(IsEmpty(Current Data Table()), dt = Open(), dt = Current Data Table());&lt;BR /&gt;dtn = dt &amp;lt;&amp;lt; GetName;&lt;BR /&gt;nr = NRow(dt);&lt;BR /&gt;nc = NCol(dt);&lt;BR /&gt;&lt;BR /&gt;// Miscellaneus&lt;BR /&gt;lbWidth = 130;&lt;BR /&gt;notImplemented = Expr(Dialog("Feature Not Implemented Yet",Button("OK")));&lt;BR /&gt;helpScript = Expr(Dialog("Quantises a Continuous variable onto an Ordinal variable 'by eye'",Button("OK")));&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// Build custom dialog in a window&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;customDlg = &lt;BR /&gt;NewWindow("Cut-Points Using "||dtn,&lt;BR /&gt;	BorderBox(left(3),top(2),&lt;BR /&gt;	VListBox(&lt;BR /&gt;		HlistBox(&lt;BR /&gt;			PanelBox("Select Column", &lt;BR /&gt;				colListData=ColListBox(All,width(lbWidth),nLines(min(nc,10)))&lt;BR /&gt;				),&lt;BR /&gt;			PanelBox("Cast Selected Columns into Role",&lt;BR /&gt;				LineUpBox(NCol(2), Spacing(3),&lt;BR /&gt;					ButtonBox("Cut-Points",colListOR &amp;lt;&amp;lt; Append(colListData&amp;lt;&lt;GETSELECTED&gt;&lt;/GETSELECTED&gt;					colListOR = ColListBox(width(lbWidth),nLines(1),Numeric)&lt;BR /&gt;					)&lt;BR /&gt;				),&lt;BR /&gt;			PanelBox("Action",&lt;BR /&gt;				LineupBox(NCol(1),&lt;BR /&gt;					ButtonBox("OK", OKScript),&lt;BR /&gt;					ButtonBox("Cancel", customDlg&amp;lt;&lt;CLOSEWINDOW&gt;&lt;/CLOSEWINDOW&gt;					TextBox(" "),&lt;BR /&gt;					ButtonBox("Remove", colListOR &amp;lt;&amp;lt; RemoveSelected),&lt;BR /&gt;					ButtonBox("Recall", notImplemented),&lt;BR /&gt;					ButtonBox("Help", helpScript))&lt;BR /&gt;				)&lt;BR /&gt;			)				// End of HListBox&lt;BR /&gt;		)					// End of VListBox&lt;BR /&gt;	)						// End of BorderBox&lt;BR /&gt;);							// End of NewWindow&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// When the user hits OK . . .&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;OKScript = Expr(&lt;BR /&gt;&lt;BR /&gt;customDlg &amp;lt;&amp;lt; CloseWindow;&lt;BR /&gt;&lt;BR /&gt;// Get values from the Dialog&lt;BR /&gt;colOR = colListOR &amp;lt;&amp;lt; GetItems;&lt;BR /&gt;&lt;BR /&gt;// Are the user selections viable?&lt;BR /&gt;if (NItems(colOR) != 1, Dialog("ERROR: You must select a Cut-Points Column", Button("OK")); Throw());&lt;BR /&gt;&lt;BR /&gt;// Column name&lt;BR /&gt;colORn = colOR[1];&lt;BR /&gt;&lt;BR /&gt;// Column reference&lt;BR /&gt;colOR = Column(dt, colORn);&lt;BR /&gt;&lt;BR /&gt;// Get a distribution&lt;BR /&gt;// NB: We use the "SubstituteInto" design pattern because we need to update the Dispatch message&lt;BR /&gt;d = Expr(&lt;BR /&gt;		dist = dt &amp;lt;&amp;lt; Distribution(&lt;BR /&gt;								Continuous Distribution(&lt;BR /&gt;									Column(colOR),&lt;BR /&gt;									Quantiles(0),&lt;BR /&gt;									Moments(0),&lt;BR /&gt;									Vertical(0),&lt;BR /&gt;									OutlierBoxPlot(0)&lt;BR /&gt;								),&lt;BR /&gt;								SendToReport(&lt;BR /&gt;									Dispatch(&lt;BR /&gt;										{"colTBD"},&lt;BR /&gt;										"Distrib Histogram",&lt;BR /&gt;										FrameBox,&lt;BR /&gt;										FrameSize(500, 300)&lt;BR /&gt;									)&lt;BR /&gt;								)&lt;BR /&gt;							)&lt;BR /&gt;		);&lt;BR /&gt;SubstituteInto(d, "colTBD", colORn);&lt;BR /&gt;d;&lt;BR /&gt;&lt;BR /&gt;// Get the report&lt;BR /&gt;distRep = Report(dist);&lt;BR /&gt;&lt;BR /&gt;// Add mose instructions and an OK button for when the cut points have been defined&lt;BR /&gt;pb = PanelBox("Define Cut-Points ");&lt;BR /&gt;tb1 = TextBox("Click once in the graphics frome to define a new cut-point. ");&lt;BR /&gt;tb2 = TextBox("Select 'OK' when you have defined all cut-points.\!N ");&lt;BR /&gt;bb = ButtonBox("OK", OKScript2);&lt;BR /&gt;pb &amp;lt;&amp;lt; Append(tb1) &amp;lt;&amp;lt; Append(tb2) &amp;lt;&amp;lt; Append(bb);&lt;BR /&gt;distRep[OutlineBox(2)] &amp;lt;&amp;lt; Append(pb);&lt;BR /&gt;&lt;BR /&gt;// Expression to be called on mouse-up in the Graphics Box - Adds a red vertical line at the chosen x value&lt;BR /&gt;addVLine = Expr(			&lt;BR /&gt;				vl = Expr( distRep[FrameBox(1)] &amp;lt;&amp;lt; AddGraphicsScript(PenColor("Red"); VLine(xTBD)) );&lt;BR /&gt;				SubstituteInto(vl, Expr(xTBD), EvalExpr(x));&lt;BR /&gt;				vl&lt;BR /&gt;				);&lt;BR /&gt;&lt;BR /&gt;// Used to capture successive x values at mouse-up&lt;BR /&gt;xVals = {};&lt;BR /&gt;&lt;BR /&gt;// Add the mouse trap script to the Graphics Box&lt;BR /&gt;distRep[FrameBox(1)] &amp;lt;&amp;lt; AddGraphicsScript(&lt;BR /&gt;										MouseTrap(&lt;BR /&gt;												{},&lt;BR /&gt;												Print("At mouse up x was "||Char(Round(x,2)));&lt;BR /&gt;												InsertInto(xVals, x);&lt;BR /&gt;												addVLine;&lt;BR /&gt;												);&lt;BR /&gt;										);&lt;BR /&gt;&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;// OKScript2: Executes when all cut-points are defined and user hits OK&lt;BR /&gt;// *********************************************************************************&lt;BR /&gt;OKScript2 = Expr(&lt;BR /&gt;&lt;BR /&gt;distRep &amp;lt;&amp;lt; CloseWindow;&lt;BR /&gt;&lt;BR /&gt;// Turn list of cut-point values into a sorted vector&lt;BR /&gt;xVals2 = J(NItems(xVals), 1, .);&lt;BR /&gt;for (i=1, i&amp;lt;=NItems(xVals), i++, xVals2&lt;I&gt; = xVals&lt;I&gt;);&lt;BR /&gt;cutPoints = SortAscending(xVals2);&lt;BR /&gt;&lt;BR /&gt;// Get the data to cut&lt;BR /&gt;data = colOR &amp;lt;&amp;lt; GetValues;&lt;BR /&gt;&lt;BR /&gt;// Apply the cut points to the data by looping over the cut points . . .&lt;BR /&gt;// NB: We handle any missing values in 'data' by initialising with '.' and treating them as a special case later&lt;BR /&gt;codedData = J(nr, 1, .);&lt;BR /&gt;&lt;BR /&gt;// txt will be a list of text values describing eaach bin&lt;BR /&gt;txt = {};&lt;BR /&gt;&lt;BR /&gt;// First cut-point&lt;BR /&gt;r = Loc(data &amp;lt;= cutPoints[1]);&lt;BR /&gt;codedData&lt;R&gt; = 1;&lt;BR /&gt;InsertInto(txt, "&amp;lt;= "||Char(cutPoints[1]));&lt;BR /&gt;&lt;BR /&gt;// Remaining cut-points other than the last&lt;BR /&gt;for (cp = 2, cp &amp;lt;=NRow(cutPoints), cp++,&lt;BR /&gt;	r = Loc((data &amp;gt; cutPoints[cp-1]) &amp;amp; (data &amp;lt;= cutPoints[cp]));&lt;BR /&gt;	codedData&lt;R&gt; = cp;&lt;BR /&gt;	InsertInto(txt, Char(cutPoints[cp-1])||" - "||Char(cutpoints[cp]))&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;// Last cut-point&lt;BR /&gt;r = Loc(data &amp;gt; cutPoints[NRow(cutPoints)]);&lt;BR /&gt;codedData&lt;R&gt; = NRow(cutPoints) + 1;&lt;BR /&gt;InsertInto(txt, "&amp;gt; "||Char(cutPoints[NRow(cutPoints)]));&lt;BR /&gt;&lt;BR /&gt;// Use txt to make a text version of coded data in a new list.&lt;BR /&gt;// Loop over the data and remember to handle any issing values&lt;BR /&gt;txtData = {};&lt;BR /&gt;for (n = 1, n &amp;lt;= NRow(data), n++,&lt;BR /&gt;	if (!IsMissing(data&lt;N&gt;),&lt;BR /&gt;		InsertInto(txtData, txt[codedData&lt;N&gt;]),&lt;BR /&gt;		InsertInto(txtData, "")&lt;BR /&gt;		);&lt;BR /&gt;	);&lt;BR /&gt;&lt;BR /&gt;// Add a column to dt with the cut data&lt;BR /&gt;binnedCol = dt &amp;lt;&amp;lt; NewColumn(colORn||" Binned", Character, Ordinal, Values(txtData));&lt;BR /&gt;&lt;BR /&gt;// Apply the value order property to the new column.&lt;BR /&gt;binnedCol &amp;lt;&amp;lt; Set Property( "Value Ordering", EvalList(txt));&lt;BR /&gt;&lt;BR /&gt;// Show the distribution of the old and new columns&lt;BR /&gt;dt &amp;lt;&amp;lt; Distribution(&lt;BR /&gt;				Continuous Distribution(&lt;BR /&gt;					Column(colOR),&lt;BR /&gt;					Quantiles(0),&lt;BR /&gt;					Moments(0),&lt;BR /&gt;					OutlierBoxPlot(0)&lt;BR /&gt;				),&lt;BR /&gt;				Nominal Distribution(&lt;BR /&gt;					Column(binnedCol),&lt;BR /&gt;					Frequencies(0)&lt;BR /&gt;					)&lt;BR /&gt;			);&lt;BR /&gt;&lt;BR /&gt;);				// End of OKScript2&lt;BR /&gt;&lt;BR /&gt;);				// End of OKScript&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-Matt&lt;/N&gt;&lt;/N&gt;&lt;/R&gt;&lt;/R&gt;&lt;/R&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Tue, 02 Mar 2010 14:43:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Distribution-Bin/m-p/1415#M1415</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2010-03-02T14:43:53Z</dc:date>
    </item>
  </channel>
</rss>

