<?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: getting column name with specific cut-off values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766866#M94687</link>
    <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. However, I have 180 columns and 20000 rows in difference words and I cannot put all of them as following scripts. Could you please provide me with more suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 18:04:54 GMT</pubDate>
    <dc:creator>doraemengs</dc:creator>
    <dc:date>2024-06-18T18:04:54Z</dc:date>
    <item>
      <title>getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766828#M94684</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to count and get specific column names from these data examples (my real data contained 180 columns and 20000 rows)&lt;/P&gt;&lt;P&gt;I want to select the column that cut-off &amp;gt; 1000&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;No.&lt;/TD&gt;&lt;TD&gt;A*1:01&lt;/TD&gt;&lt;TD&gt;A*2:01&lt;/TD&gt;&lt;TD&gt;B*9:02&lt;/TD&gt;&lt;TD&gt;C*10:01&lt;/TD&gt;&lt;TD&gt;DR*56:01&lt;/TD&gt;&lt;TD&gt;DP*07_G&lt;/TD&gt;&lt;TD&gt;Get name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10.67&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;9520.23&lt;/TD&gt;&lt;TD&gt;15000.1&lt;/TD&gt;&lt;TD&gt;90.56&lt;/TD&gt;&lt;TD&gt;40.89&lt;/TD&gt;&lt;TD&gt;B*9:02,&amp;nbsp;C*10:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;9.56&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;9040.3&lt;/TD&gt;&lt;TD&gt;345.3&lt;/TD&gt;&lt;TD&gt;345.9&lt;/TD&gt;&lt;TD&gt;999.9&lt;/TD&gt;&lt;TD&gt;345&lt;/TD&gt;&lt;TD&gt;10.5&lt;/TD&gt;&lt;TD&gt;A*1:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;34.4&lt;/TD&gt;&lt;TD&gt;4566&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;A*2:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;9190.2&lt;/TD&gt;&lt;TD&gt;13567&lt;/TD&gt;&lt;TD&gt;3456&lt;/TD&gt;&lt;TD&gt;6789&lt;/TD&gt;&lt;TD&gt;9088&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;A*1:01,A*2:01,B*9:02,C*10:01,DR*56:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I try the previous script like this&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create a sample data table
dt = New Table( "Example",
	Add Rows( 2 ),
	New Column( "A*1:01", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 50000] ) ),
	New Column( "A*2:01", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 50000] ) ),
	New Column( "B*9:02", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 50000] ) ),
	New Column( "C*10:01", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 50000] ) ),
	New Column( "DR*56:01", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 50000] ) ),
//get wanted columns. Assumes that IMC columns start from column 1 and all IMC columns are one after another
colNames = dt &amp;lt;&amp;lt; Get Column Names("String");
For(i = N Items(colNames), i &amp;gt; 3000 , i--,
);

//new column with IMC with value 1
dt &amp;lt;&amp;lt; New Column( "Ag", Character, 
	&amp;lt;&amp;lt; Set Each Value(
		rowValues = dt[Row(), 0][1::N Items(colNames)]; //get values of row as matrix
		colIndex = Contains(rowValues, 1); //get index of
		If(colIndex &amp;gt; 0, //handle 
			colNames[colIndex], //get column name with the index
			""; //when no 1 found use ""
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could you please to correct my scripts, Thank you!&lt;/P&gt;&lt;P&gt;In addition, can I use matrix because of I need to generate the "new column" of 180 column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 16:05:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766828#M94684</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-06-18T16:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766865#M94686</link>
      <description>&lt;P&gt;Here is how I would handle this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1718733620444.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65369iF39A9B059013E893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1718733620444.png" alt="txnelson_0-1718733620444.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = New Table( "Example",
	Add Rows( 6 ),
	New Column( "A*1:01",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[10.67, 0, 9040.2999999999993, 34.399999999999999, 9190.2000000000007, 0
			]
		)
	),
	New Column( "A*2:01",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [0, 0, 345.30000000000001, 4566, 13567, 0] )
	),
	New Column( "B*9:02",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [9520.2299999999996, 0, 345.89999999999998, 45, 3456, 0] )
	),
	New Column( "C*10:01",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [15000.1, 0, 999.89999999999998, 7, 6789, 0] )
	),
	New Column( "DR*56:01",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [90.560000000000002, 0, 345, 0, 9088, 0] )
	),
	New Column( "DP*07_G",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [40.890000000000001, 9.5600000000000005, 10.5, 0, 0, 0] )
	)
);

dt &amp;lt;&amp;lt; New Column( "Get Name",character);

colNames = dt &amp;lt;&amp;lt; get column names( continuous,string );

For Each Row(
	theList = {};
	For Each( {col, i}, colNames,
		If( As Column( col ) &amp;gt; 3000,
			Insert Into( theList, col )
		)
	);
	:Get Name = Concat Items( theList, "," );
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:00:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766865#M94686</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-06-18T18:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766866#M94687</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. However, I have 180 columns and 20000 rows in difference words and I cannot put all of them as following scripts. Could you please provide me with more suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:04:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766866#M94687</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-06-18T18:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766871#M94692</link>
      <description>&lt;P&gt;This might be fast enough&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Create a sample data table
dt = New Table("Example",
	Add Rows(20000),
	invisible
);

colcount = 200;
For(i = 1, i &amp;lt;= colcount, i++,
	newcol = dt &amp;lt;&amp;lt; New Column(Char(i), Numeric, Continuous, Formula(
		Random Normal() * 1000
	));
	dt &amp;lt;&amp;lt; run formulas;
	newcol &amp;lt;&amp;lt; delete formula;
);

start = Tick Seconds();
colnames = dt &amp;lt;&amp;lt; Get Column Names("String");
newcol = dt &amp;lt;&amp;lt; New Column("getname", Character, Nominal, Formula(
	valid_idx = Loc(dt[Row(), colnames] &amp;gt; 1000);
	If(N Items(valid_idx) &amp;gt; 0,
		Concat Items(colnames[valid_idx], ", ")
	,
		""
	);
));
dt &amp;lt;&amp;lt; run formulas;
newcol &amp;lt;&amp;lt; delete formula;

wait(0);
end = Tick Seconds();
show(end - start);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:36:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766871#M94692</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-18T18:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766872#M94693</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much. But the result is "end - start = 0.0333333333255723;" That's not the new table. could you please provide more solutions? please show me the following data table on JMP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:54:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766872#M94693</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-06-18T18:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766875#M94694</link>
      <description>&lt;P&gt;My script creates new column "getname" with the values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1718737059176.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65370iDA5BC00C99525FA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1718737059176.png" alt="jthi_0-1718737059176.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With your data, after you fix your columns to numeric (and drop No column)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1718737144803.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65371i6D303FE32E3F7E3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1718737144803.png" alt="jthi_1-1718737144803.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:59:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766875#M94694</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-18T18:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766877#M94696</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help but to be honest as in the following attachment, I cannot run the script as you did. when I checked the script (command + 1) shown below. Thank you for your help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table("Example",
	Add Rows(20000),
	invisible
);

colcount = 200;
For(i = 1, i &amp;lt;= colcount, i++,
	newcol = dt &amp;lt;&amp;lt; New Column(Char(i), Numeric, Continuous, Formula(
		Random Normal() * 1000
	));
	dt &amp;lt;&amp;lt; run formulas;
	newcol &amp;lt;&amp;lt; delete formula;
);

start = Tick Seconds();
colnames = dt &amp;lt;&amp;lt; Get Column Names("String");
newcol = dt &amp;lt;&amp;lt; New Column("getname", Character, Nominal, Formula(
	valid_idx = Loc(dt[Row(), colnames] &amp;gt; 1000);
	If(N Items(valid_idx) &amp;gt; 0,
		Concat Items(colnames[valid_idx], ", ")
	,
		""
	);
));
dt &amp;lt;&amp;lt; run formulas;
newcol &amp;lt;&amp;lt; delete formula;

wait(0);
end = Tick Seconds();
show(end - start);
/*:

end - start = 0.683333333348855;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 19:18:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766877#M94696</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-06-18T19:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766882#M94697</link>
      <description>&lt;P&gt;You will have to open your table, fix the columns and then run the part where new column is created&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Examples_get column name_by cutoff.jmp", invisible);

colnames = Remove(dt &amp;lt;&amp;lt; Get Column Names("String"), 1); // drop No column

// Fix data and modeling types
For Each({colname}, colnames,
	Column(dt, colname) &amp;lt;&amp;lt; Data Type("Numeric") &amp;lt;&amp;lt; Modeling Type("Continuous");
);


newcol = dt &amp;lt;&amp;lt; New Column("getname", Character, Nominal, Formula(
	valid_idx = Loc(dt[Row(), colnames] &amp;gt; 1000);
	If(N Items(valid_idx) &amp;gt; 0,
		Concat Items(colnames[valid_idx], ", ")
	,
		""
	);
));
dt &amp;lt;&amp;lt; run formulas;
newcol &amp;lt;&amp;lt; delete formula;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I strongly suggest you check out &lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/introduction-to-writing-jsl-scripts.shtml#" target="_blank" rel="noopener"&gt;Scripting Guide from JMP Help&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 19:22:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/766882#M94697</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-18T19:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781325#M96392</link>
      <description>&lt;P&gt;Hi Jarmo, Do you have any idea for extracting the values of this that are more than the cutoff (if I have 50 columns) with each column name (getname column on an examples)&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 15:08:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781325#M96392</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-13T15:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781338#M96394</link>
      <description>&lt;P&gt;How do you wish to extract them? Doesn't my solution create new column which has the column names as strings separated by , and space?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1723564823980.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67103i54E15BA4DD439EFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1723564823980.png" alt="jthi_0-1723564823980.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you wish to check values by column instead of by row? Or something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;If you just want different column list, I would have to know how to filter it. If you just want all columns, remove the Remove() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Examples_get column name_by cutoff.jmp", invisible);

colnames = dt &amp;lt;&amp;lt; Get Column Names("String");
For Each({colname}, colnames,
	Column(dt, colname) &amp;lt;&amp;lt; Data Type("Numeric") &amp;lt;&amp;lt; Modeling Type("Continuous");
);


For(i = 1, i &amp;lt; 100, i++,
	newcol = dt &amp;lt;&amp;lt; New Column(Hex(i), Numeric, Nominal, Values(J(1, N Rows(dt), Random Normal()*1000)));
);

colnames = dt &amp;lt;&amp;lt; Get Column Names("String");

newcol = dt &amp;lt;&amp;lt; New Column("getname", Character, Nominal, Formula(
	valid_idx = Loc(dt[Row(), colnames] &amp;gt; 1000);
	If(N Items(valid_idx) &amp;gt; 0,
		Concat Items(colnames[valid_idx], ", ")
	,
		""
	);
));
dt &amp;lt;&amp;lt; run formulas;
newcol &amp;lt;&amp;lt; delete formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Aug 2024 16:47:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781338#M96394</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-13T16:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781343#M96399</link>
      <description>&lt;P&gt;Here is an alternative method that may help with a large number of columns&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open("$DOWNLOADS/Examples_get column name_by cutoff.jmp");

colnames = Remove( dt &amp;lt;&amp;lt; Get Column Names( "String" ), 1 ); // drop No column

// Fix data and modeling types
For Each({colname}, colnames,
	Column(dt, colname) &amp;lt;&amp;lt; Data Type("Numeric") &amp;lt;&amp;lt; Modeling Type("Continuous");
);

dtStack = dt &amp;lt;&amp;lt; Stack(
	columns( colnames ),
	Source Label Column( "ColName" ),
	Stacked Data Column( "Value" ),
	Output Table( "The Stack" )
);

dtStack &amp;lt;&amp;lt; select where( :value &amp;lt;= 1000 );
dtStack &amp;lt;&amp;lt; delete rows;
dtStack &amp;lt;&amp;lt; delete columns( Value );

dtSplit = dtStack &amp;lt;&amp;lt; Split(
	Split By( :ColName ),
	Split( :ColName ),
	Group( :No ),
	Output Table( "Split of The Stack by ColName" ),
	Sort by Column Property
);

close( dtStack, nosave );
colnames = Remove( dtSplit &amp;lt;&amp;lt; Get Column Names( "String" ), 1 );
dtSplit &amp;lt;&amp;lt; Combine Columns(
	delimiter( "," ),
	columns( colnames ),
	Column Name( "Get Name" )
);
dtSplit &amp;lt;&amp;lt; delete columns( colnames );
dt &amp;lt;&amp;lt; Update( With( dtSplit ), Match Columns( :No = :No ) );

Close( dtSplit, nosave );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Aug 2024 16:31:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781343#M96399</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-13T16:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781370#M96412</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-13 at 2.11.43 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67107i298C620D7389DFAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-08-13 at 2.11.43 PM.png" alt="Screenshot 2024-08-13 at 2.11.43 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Thank you so much, I would like to clarify this. I have another column of interest as "alphabet of interest" and I want to get name and value of all columns with values&amp;gt; 1,000 and all columns match with the column alphabet of interest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 18:15:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781370#M96412</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-13T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781371#M96413</link>
      <description>&lt;P&gt;Thank you, Jim, but it does not work. please see the attached file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 18:26:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781371#M96413</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-13T18:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781383#M96415</link>
      <description>&lt;P&gt;Most likely doing something like Jim suggested is faster and easier, but you can do something like this with the method I did demonstrate&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Examples_get column name_by cutoff.jmp", invisible);

Summarize(dt, alphs = By(:"Alphabet of interest"n));
aa = Associative Array(alphs, Repeat({{}}, N Items(alphs)));

collist = dt &amp;lt;&amp;lt; Get Column Names("String");
For Each({colname}, collist,
	alph = Word(1, colname, "*");
	If(Contains(aa, alph),
		Insert Into(aa[alph], colname);
		Column(dt, colname) &amp;lt;&amp;lt; Set Data Type("Numeric") &amp;lt;&amp;lt; Modeling Type("Continuous");
	);
);


str_template = "^col^ (^val^)";
newcol = dt &amp;lt;&amp;lt; New Column("getname", Character, Nominal, Formula(
	cols = aa[:"Alphabet of interest"n];
	vals = dt[Row(), aa[:"Alphabet of interest"n]];
	valid_idx = Loc(vals &amp;gt; 1000);
	
	If(N Items(valid_idx) &amp;gt; 0,
		res = {};
		For Each({{col, val}}, Across(cols[valid_idx], vals[valid_idx]),
			Insert Into(res, Eval Insert(str_template));
		);
		Concat Items(res, ", ");
	,
		""
	);
));

dt &amp;lt;&amp;lt; run formulas;
newcol &amp;lt;&amp;lt; delete formula;

dt &amp;lt;&amp;lt; show window(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1723574578991.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67108iE122E40D5333F4D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1723574578991.png" alt="jthi_0-1723574578991.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 18:43:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781383#M96415</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-13T18:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781384#M96416</link>
      <description>&lt;P&gt;If the script was written to run with a column called "No" followed by numerical columns.&amp;nbsp; Your supplied data table has 2 character columns in addition to the numeric.&amp;nbsp; If you remove the columns "Alphabet of interest" and "get name and value" and then run the script, it works fine.&lt;/P&gt;
&lt;P&gt;You should be able to easily change the script to compensate for the additional columns.&amp;nbsp; Either deleting them in the script before beginning the getting the colnames retrieved, or else deleting them from the colnames list before processing the For Each should work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 19:18:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781384#M96416</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-13T19:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781398#M96419</link>
      <description>&lt;P&gt;Thank you so much. This script does work. However, I am sorry that my original data was complicated more than this. The Alphabet of interest has multiple "alphabet" and "numbers" separated with "," (A1, B9) as attached files. How can I get name and value column that correlated alphabet of interest column and column name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-13 at 4.12.46 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67109i0825C0F362C0A792/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-08-13 at 4.12.46 PM.png" alt="Screenshot 2024-08-13 at 4.12.46 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 20:13:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781398#M96419</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-13T20:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781461#M96428</link>
      <description>&lt;P&gt;How are those "alphabets" determined? Are they everything that is after last "_"? If that is the case you should be able to make very slight modification to my script and take last word instead of the first and use different separator, so this part requires slight modification&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;alph = Word(1, colname, "*");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Aug 2024 04:11:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781461#M96428</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-14T04:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781507#M96435</link>
      <description>&lt;P&gt;Thank you for your suggestion. If I want to match the first word before ":" it should be this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;alph = Word(1, colname, ":");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and if I want to match the last word after "_" it should be this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;alph = Word(-1, colname, "_");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What if I need to match before ":" and after "_" simultaneously? After I joined the scripts I ran for each above, I could not manage with duplicate (exactly the same thing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 13:09:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781507#M96435</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-14T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781508#M96436</link>
      <description>&lt;P&gt;Looking at your table start and end will be different (start A*1 and end A1) so you will have to add those "extra" keys to the associative array to perform the comparison AND handle duplicates later.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 13:14:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781508#M96436</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-14T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: getting column name with specific cut-off values</title>
      <link>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781509#M96437</link>
      <description>&lt;P&gt;In addition, if a column in the alphabet of interest had more than 1, the script did not run. Do you have any suggestion on this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 13:15:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/getting-column-name-with-specific-cut-off-values/m-p/781509#M96437</guid>
      <dc:creator>doraemengs</dc:creator>
      <dc:date>2024-08-14T13:15:39Z</dc:date>
    </item>
  </channel>
</rss>

