<?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: How to script changing column data type to Numeric when the rows are a mix of string and numbers in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273309#M53162</link>
    <description>&lt;P&gt;This example shows how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt  = Open( "$SAMPLE_DATA/Big Class.jmp" );

test = dt &amp;lt;&amp;lt; New Column( "Test", Character, Nominal,
	Values({
		"Mark",
		"Jane",
		"5.37",
		"3.14",
		"Linda",
		"1.732"
	})
);

Wait( 2 );

test &amp;lt;&amp;lt; Set Data Type( Numeric );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Jun 2020 18:22:42 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2020-06-17T18:22:42Z</dc:date>
    <item>
      <title>How to script changing column data type to Numeric when the rows are a mix of string and numbers</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273303#M53161</link>
      <description>&lt;P&gt;I have a data column where some rows are string and some rows are numbers.&amp;nbsp; When I manually convert the Data Type from Character to Numeric, the strings disappear leaving only the text rows.&amp;nbsp; This is the exact result I would like to replicate via JSL.&amp;nbsp; However when I run a script that performs the same functions it does not change the Data Type for the column.&lt;BR /&gt;&lt;BR /&gt;Attached is a screen recording showing both the script not acting on the column and the manual process of changing the Data Type with desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6165037635001w960h540r656" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6165037635001" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6165037635001w960h540r656');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6165037635001"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:14:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273303#M53161</guid>
      <dc:creator>user8421</dc:creator>
      <dc:date>2023-06-10T23:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to script changing column data type to Numeric when the rows are a mix of string and numbers</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273309#M53162</link>
      <description>&lt;P&gt;This example shows how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt  = Open( "$SAMPLE_DATA/Big Class.jmp" );

test = dt &amp;lt;&amp;lt; New Column( "Test", Character, Nominal,
	Values({
		"Mark",
		"Jane",
		"5.37",
		"3.14",
		"Linda",
		"1.732"
	})
);

Wait( 2 );

test &amp;lt;&amp;lt; Set Data Type( Numeric );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jun 2020 18:22:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273309#M53162</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-06-17T18:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to script changing column data type to Numeric when the rows are a mix of string and numbers</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273312#M53163</link>
      <description>&lt;P&gt;Your JSL syntax is incorrect.&amp;nbsp; It should be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
dt:example &amp;lt;&amp;lt; data type(numeric)&amp;lt;&amp;lt;format("Best", 12) &amp;lt;&amp;lt;
modeling type(continuous);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jun 2020 18:23:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-changing-column-data-type-to-Numeric-when-the-rows/m-p/273312#M53163</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-06-17T18:23:30Z</dc:date>
    </item>
  </channel>
</rss>

