<?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: What is the best way to rename a data table without ruining saved scripts? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/905940#M106425</link>
    <description>&lt;P&gt;Thanks for the tip, Byron_JMP! I realize that would fix it. The challenge is my laziness saving a lot of code that is&amp;nbsp;&lt;SPAN&gt;generated from the graphs etc, some of which include the name of the data file. Since I work fast and sloppy, I resave many times. I guess I would have to look through my scripts when finished to see which ones include the file name. This is for data that I study for specific experiments. For data that I use long-term, and possibly share, I think your suggested solution is what I should use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would be nice if a script could change the table names in the scripts, or possibly interpret the table names differently. Haven't thought that through, though. Might end up creating other problems..&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Oct 2025 11:34:29 GMT</pubDate>
    <dc:creator>Ake</dc:creator>
    <dc:date>2025-10-04T11:34:29Z</dc:date>
    <item>
      <title>What is the best way to rename a data table without ruining saved scripts?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/903707#M106266</link>
      <description>&lt;P&gt;When I write reports I embed the data table into the word document in a zip-file, so that future readers can extract the data. When I am about to do that I often realize the the name of the data table was chosen hastily&lt;SPAN&gt;, so I want to give it a better name before saving into the report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem I run into is that some (not all) of the scripts I have saved along the way contains the name of the data table., with the result that hose scripts stop working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to rename the data table without running into this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 13:47:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/903707#M106266</guid>
      <dc:creator>Ake</dc:creator>
      <dc:date>2025-09-25T13:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to rename a data table without ruining saved scripts?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/903869#M106267</link>
      <description>&lt;P&gt;If you want to be super robust about your scripts saved to a data table, you could add a little JSL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//something like this&lt;BR /&gt;dt=current data table();
dt&amp;lt;&amp;lt; Distribution(Continuous Distribution( Column( :Protein ) ));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you're not working with scripts saved to a data table. It is often a very good idea to replace the explicit data table names with a variable so that if the table name changes (e.g. gets appended to) then the script will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data table("emanon") &amp;nbsp;is an explicit table name.&lt;/P&gt;
&lt;P&gt;dt=open("emanon.JMP"); is a reference to the table name. &amp;nbsp;When dt is evaluated it is: data table("emanon"), but in all your scripts it's just dt. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//original script

Data Table( "trends.jmp" ) &amp;lt;&amp;lt; Stack(
	columns( :Protein, :Purity ),
	Drop All Other Columns( 1 ),
	Output Table( "Stack of trends (Protein etc.)" )
);

//edit to variable references
&lt;BR /&gt;dt=current datatable(); //or some other way to reference the table you're acting on&lt;BR /&gt;
dt1=dt&amp;lt;&amp;lt; Stack(
	columns( :Protein, :Purity ),
	Drop All Other Columns( 1 ),
	Output Table( "Stack of trends (Protein etc.)" )
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;although the table name is&amp;nbsp;&lt;CODE class=" language-jsl"&gt;"Stack of trends (Protein etc.)"&lt;/CODE&gt; the reference for the new table is dt1, which has the added bonus of being much easier to type than the entire table name (that I would misspell and break the script).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 14:24:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/903869#M106267</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2025-09-25T14:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to rename a data table without ruining saved scripts?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/905940#M106425</link>
      <description>&lt;P&gt;Thanks for the tip, Byron_JMP! I realize that would fix it. The challenge is my laziness saving a lot of code that is&amp;nbsp;&lt;SPAN&gt;generated from the graphs etc, some of which include the name of the data file. Since I work fast and sloppy, I resave many times. I guess I would have to look through my scripts when finished to see which ones include the file name. This is for data that I study for specific experiments. For data that I use long-term, and possibly share, I think your suggested solution is what I should use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would be nice if a script could change the table names in the scripts, or possibly interpret the table names differently. Haven't thought that through, though. Might end up creating other problems..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2025 11:34:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-best-way-to-rename-a-data-table-without-ruining/m-p/905940#M106425</guid>
      <dc:creator>Ake</dc:creator>
      <dc:date>2025-10-04T11:34:29Z</dc:date>
    </item>
  </channel>
</rss>

