<?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: Splitting a String of Characters in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16504#M15038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! That helped a lot. Unfortunately that was just the beginning of what I wanted to do, and I'm not sure how to do that rest...&lt;/P&gt;&lt;P&gt;So I really need to indicate what half of the string I'm looking at. All 100 rows of strings I am splitting are for the same data, and all the first half strings have the same name, and so do the second half strings. And once I have that I need to graph both halves separately. When I tried to graph it manually in JMP, it did not turn out as I expected. How I have done this analysis is through Excel because it displayed the graph how I wanted it to be. Basically I just need all the new columns that the bits go into (in this case they are voltages) along the x-axis and the data along the y-axis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only problem is that I couldn't figure out how to do that in JMP. Any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Mar 2016 21:59:36 GMT</pubDate>
    <dc:creator>sophiaw</dc:creator>
    <dc:date>2016-03-07T21:59:36Z</dc:date>
    <item>
      <title>Splitting a String of Characters</title>
      <link>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16502#M15036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! I want to parse a string of characters. I have 202 binary bits in my string and I want to cut that string in half. I believe I could find the length of the string and maybe get it to return the values at a certain number of characters. I'm just not sure how to actually use that to cut it in half and have two columns with 101 bits in each. And after I get that, I want to separate every bit into it's own column. So I want 101 columns of either a '1' or a '0' in it. I just don't know how to parse it by number of characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 01:59:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16502#M15036</guid>
      <dc:creator>sophiaw</dc:creator>
      <dc:date>2016-01-26T01:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a String of Characters</title>
      <link>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16503#M15037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// input data is a string of character 1s and 0s representing bits&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;string = "11110000111000110010";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// split the string in two at the middle&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// this substring starts at character 1 and goes for half the length&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;firsthalf = Substr( string, 1, Length( string ) / 2 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// this substring starts just beyond the previous and the&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// implicit length goes to the end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;secondhalf = Substr( string, 1 + Length( string ) / 2 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// the 1 and 0 bits go one per column&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;ncols = Length( firsthalf );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// start a fresh table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;dt = New Table( "example" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// add columns wtih names like "c3" for each bit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;For( i = 1, i &amp;lt;= ncols, i++, // the || operator joins two strings&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; dt &amp;lt;&amp;lt; New Column( "c" || Char( i ) ) // i is a number, char makes a string&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// make a helper function to add bits to a row in dt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;adddata = Function( {bits}, // parameter to function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; {i, c}, // local variables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; dt &amp;lt;&amp;lt; addrows( 1 ); // function knows to use dt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; For( i = 1, i &amp;lt;= Length( bits ), i++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; c = Column( dt, "c" || Char( i ) ); // same as above&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; dt:c = Num( Substr( bits, i, 1 ) ); // put bit in column&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// each call to adddata puts a row of bits in dt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;adddata( firsthalf );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;adddata( secondhalf );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;adddata( "1010101010" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;adddata( "1111111111" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;adddata( "0000000000" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10827_pastedImage_4.png" style="width: 660px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2645iA5F6F5967729226F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10827_pastedImage_4.png" alt="10827_pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 01:41:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16503#M15037</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-19T01:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a String of Characters</title>
      <link>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16504#M15038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! That helped a lot. Unfortunately that was just the beginning of what I wanted to do, and I'm not sure how to do that rest...&lt;/P&gt;&lt;P&gt;So I really need to indicate what half of the string I'm looking at. All 100 rows of strings I am splitting are for the same data, and all the first half strings have the same name, and so do the second half strings. And once I have that I need to graph both halves separately. When I tried to graph it manually in JMP, it did not turn out as I expected. How I have done this analysis is through Excel because it displayed the graph how I wanted it to be. Basically I just need all the new columns that the bits go into (in this case they are voltages) along the x-axis and the data along the y-axis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only problem is that I couldn't figure out how to do that in JMP. Any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 21:59:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16504#M15038</guid>
      <dc:creator>sophiaw</dc:creator>
      <dc:date>2016-03-07T21:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a String of Characters</title>
      <link>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16505#M15039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally there is a dependency between the way your data is organised and what a JMP platform will (or won't) give you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure I've understood what you are after completely, but if you add this code to Craige's above I think you will get close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;dt2 = dt &amp;lt;&amp;lt; &lt;SPAN style="color: #011993;"&gt;Transpose&lt;/SPAN&gt;(&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;columns( :c1, :c2, :c3, :c4, :c5, :c6, :c7, :c8, :c9, :c10 ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Output Table( &lt;/SPAN&gt;"Transpose of example"&lt;SPAN style="color: #000000;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;);&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;dt2 &amp;lt;&amp;lt; &lt;/SPAN&gt;Graph Builder&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Show Control Panel( &lt;SPAN style="color: #009193;"&gt;0&lt;/SPAN&gt; ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Variables(&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;X( :Label ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Y( :Row 1 ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Y( :Row 2 ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Y( :Row 3 ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Y( :Row 4 ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Y( :Row 5 )&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Elements( Position( &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt; ), Bar( X, Y, Legend( &lt;SPAN style="color: #009193;"&gt;12&lt;/SPAN&gt; ) ) ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Elements( Position( &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;2&lt;/SPAN&gt; ), Bar( X, Y, Legend( &lt;SPAN style="color: #009193;"&gt;13&lt;/SPAN&gt; ) ) ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Elements( Position( &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;3&lt;/SPAN&gt; ), Bar( X, Y, Legend( &lt;SPAN style="color: #009193;"&gt;15&lt;/SPAN&gt; ) ) ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Elements( Position( &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;4&lt;/SPAN&gt; ), Bar( X, Y, Legend( &lt;SPAN style="color: #009193;"&gt;23&lt;/SPAN&gt; ) ) ),&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Elements( Position( &lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, &lt;SPAN style="color: #009193;"&gt;5&lt;/SPAN&gt; ), Bar( X, Y, Legend( &lt;SPAN style="color: #009193;"&gt;27&lt;/SPAN&gt; ) ) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; line-height: normal; font-family: Menlo;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would have to adjust the values in column 'Label' to be the voltages, and you could do that with 'Recode' or through a little more JSL. Once you have what you want, it may be that there is a more direct way to get there. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 10:08:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Splitting-a-String-of-Characters/m-p/16505#M15039</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2016-03-08T10:08:44Z</dc:date>
    </item>
  </channel>
</rss>

