<?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: Transpose non specific data columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639075#M83688</link>
    <description>&lt;P&gt;When you know the names of columns you wish to transpose, you can use them in Transpose(columns()) using eval&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

cols_to_transpose = {"height", "weight"};

dt_transposed = dt &amp;lt;&amp;lt; Transpose(
	columns(Eval(cols_to_transpose)),
	Label column name("name"),
	Output Table("Transpose of Big Class")
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Jun 2023 04:09:57 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-06-06T04:09:57Z</dc:date>
    <item>
      <title>Transpose non specific data columns</title>
      <link>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639020#M83686</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am creating a script in jsl but I am having a problem in transposing the table since the columns needed needs to be specified. However, in my case, the columns depend on the data, so it is changing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a jsl script where I can transpose non specific data columns?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 00:01:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639020#M83686</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-11T00:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose non specific data columns</title>
      <link>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639075#M83688</link>
      <description>&lt;P&gt;When you know the names of columns you wish to transpose, you can use them in Transpose(columns()) using eval&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

cols_to_transpose = {"height", "weight"};

dt_transposed = dt &amp;lt;&amp;lt; Transpose(
	columns(Eval(cols_to_transpose)),
	Label column name("name"),
	Output Table("Transpose of Big Class")
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2023 04:09:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639075#M83688</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-06T04:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose non specific data columns</title>
      <link>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639080#M83689</link>
      <description>&lt;P&gt;Here is one example of a Transpose script that&amp;nbsp; examines the data from the data table and generates a transposed data table based upon the data;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

theTranspose = Expr(
	dt = Current Data Table();

// Get the first character column to use as the Label
	theLabel = (dt &amp;lt;&amp;lt; get column names( string, character ))[1];

// Get the numeric columns.  All numeric columns will be transposed
	theTransColumns = dt &amp;lt;&amp;lt; get column names( string, numeric );

// Transpose the data
	dt &amp;lt;&amp;lt; Transpose( columns( theTransColumns ), Label( As Column( theLabel ) ) );
);

// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

theTranspose;

// Open Data Table: Blood Pressure.jmp
// → Data Table( "Blood Pressure" )
Open( "$SAMPLE_DATA/Cities.jmp" );

theTranspose;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am sure this does not solve your specific problem, however, not knowing what your rules for how you want to transpose were not specified, I set the rules to be that all numeric columns found will be transposed, and that the first character column found would contain the new column names.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 04:17:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transpose-non-specific-data-columns/m-p/639080#M83689</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-06T04:17:28Z</dc:date>
    </item>
  </channel>
</rss>

