<?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 Standardizing attributes by column name in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743516#M92309</link>
    <description>&lt;P&gt;I tend to work with the same types of data every day.&amp;nbsp; Every time I load a file, JMP sets some columns as "Continuous" that really work better as nominals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to tell JMP that if it sees a column with a specific name, e.g. "case_id", that it should always flag it as nominal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know scripts can do this, but having to run a script every time I open a file has gotten a bit tedious.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 20:53:27 GMT</pubDate>
    <dc:creator>BHarris</dc:creator>
    <dc:date>2024-04-02T20:53:27Z</dc:date>
    <item>
      <title>Standardizing attributes by column name</title>
      <link>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743516#M92309</link>
      <description>&lt;P&gt;I tend to work with the same types of data every day.&amp;nbsp; Every time I load a file, JMP sets some columns as "Continuous" that really work better as nominals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to tell JMP that if it sees a column with a specific name, e.g. "case_id", that it should always flag it as nominal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know scripts can do this, but having to run a script every time I open a file has gotten a bit tedious.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:53:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743516#M92309</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2024-04-02T20:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Standardizing attributes by column name</title>
      <link>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743588#M92314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12313"&gt;@BHarris&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;During import, you can right click the column to define is as nominal. But, I guess you want to automate that without the need to re-defined it again every time you open the working file.&lt;/P&gt;
&lt;P&gt;I think if you can convert the script to an "add-in", it is possible to tell JMP that if they see a column with specific name, always define it as nominal whenever you open the file.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WebDesignesCrow_0-1712107566004.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63004i7BBB49F7270F5160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WebDesignesCrow_0-1712107566004.png" alt="WebDesignesCrow_0-1712107566004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Question though;&lt;/P&gt;
&lt;P&gt;- the files that you open is not in standardized "column" / "header" position?&lt;/P&gt;
&lt;P&gt;- or is it any data file, but the column "case_id" would be consistently present?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 01:31:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743588#M92314</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2024-04-03T01:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Standardizing attributes by column name</title>
      <link>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743589#M92315</link>
      <description>&lt;P&gt;Yes, these are .tsv files that have a "case_id" column -- not guaranteed to be in the same column from file to file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can add-ins be programmed to run every time a file is opened?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 01:39:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743589#M92315</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2024-04-03T01:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Standardizing attributes by column name</title>
      <link>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743599#M92316</link>
      <description>&lt;P&gt;Rather than use default Open file function, you just open the file through add-in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tested simple script like below to convert "case_id" to nominal, for 2 TSV files inside 1 folder.&lt;/P&gt;
&lt;P&gt;Pls mind the path that I set is "Documents/TSV".&lt;/P&gt;
&lt;P&gt;You can change the path for testing at your PC.&lt;/P&gt;
&lt;P&gt;If all good, then you can convert this JSL script to add-in (refer to&amp;nbsp;&lt;A title="Add-in Builder" href="https://community.jmp.com/t5/Learning-Center/Add-In-Builder/ta-p/276711" target="_self"&gt;https://community.jmp.com/t5/Learning-Center/Add-In-Builder/ta-p/276711&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Open  Table to pick file
Names Default To Here( 1 );
file = Pick File(
	"Select the TSV file to input",
	"$DOCUMENTS/TSV",
	{"All Files|*"},
	1,
	0
);
If( file != "",
	dt1 = Open(
		file,
		Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Tab, CSV( 0 ) ),
		Strip Quotes( 0 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Use Regional Settings( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 1 ),
		Column Names Start( 1 ),
		First Named Column( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
		)
	)
);

//Standardize "case_ID" to character nominal
Names Default To Here( 1 );
dt1 :case_id &amp;lt;&amp;lt; Data Type( Character ) &amp;lt;&amp;lt;
Set Modeling Type( "Nominal" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 10:19:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Standardizing-attributes-by-column-name/m-p/743599#M92316</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2024-04-03T10:19:28Z</dc:date>
    </item>
  </channel>
</rss>

