<?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: Search the string in Column and copy the numeric value in 2nd column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251549#M49394</link>
    <description>&lt;P&gt;While&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt; suggestion of using an Associative Array, will work, I believe that a simple Join will probably solve the problem.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open the JMP table with 10,000 rows&lt;/LI&gt;
&lt;LI&gt;Open in JMP, the Excel file&lt;/LI&gt;
&lt;LI&gt;Using the JMP table from Excel as the base table, use
&lt;OL&gt;
&lt;LI&gt;Tables==&amp;gt;Update &amp;nbsp; &amp;nbsp;&amp;nbsp; to match the names and add in the ages to the base table&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Save the updated table back as an Excel file&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I suggest you take the time to read the documentation&amp;nbsp; "Discovering JMP" and "Using JMP"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;JMP Documentation Library&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 15:30:50 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-03-10T15:30:50Z</dc:date>
    <item>
      <title>Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251414#M49356</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have an Excel Worksheet consisting of two columns, one columns has strings with person name and other column contain age of the person. I have almost a list of 500 person. Is there any way I can automate it?Like using script to assign age based on the person name ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:26:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251414#M49356</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T23:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251421#M49357</link>
      <description>&lt;P&gt;Assuming the list of 500 names is in a JMP data table, and you have that csv file with the Names and Ages, you can easily input the csv file, and then use&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Tables==&amp;gt;Join&lt;/P&gt;
&lt;P&gt;to match the name/age data table to the table with the list of 500 names.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 19:41:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251421#M49357</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-09T19:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251432#M49358</link>
      <description>&lt;P&gt;Yes that's the easiest approach, but the problem is JMP data file has 10000 data sets of different names and the excel sheet has random 500 names from 10000 data sets of jmp file. So I want something which can search those particular name in the excel and past the age from jmp data file&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 19:54:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251432#M49358</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-09T19:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251437#M49360</link>
      <description>&lt;P&gt;You have 10,000 JMP data tables....correct?&amp;nbsp; What are the data table names?&amp;nbsp; Can that be used to determine how to find the data table that has the age for a given name in the Excel spreadsheet?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide information about what data are in the 10,000 JMP data tables, and how do you get the age from the data table, once you find the correct JMP data table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More specifics are really needed before one can attempt to solve your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 20:08:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251437#M49360</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-09T20:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251503#M49381</link>
      <description>&lt;P&gt;Hi Txnelson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JMP file has 10,000 rows and 2 columns. The 1st column name is Person and the 2nd is age. Yes it can be used to find the data table t&lt;SPAN&gt;hat has the age for a given name in the Excel spreadsheet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The JMP data file has 10,000 rows having different names and ages (Strings and numbers)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Both the person name and age are listed in the JMP data file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a excel file which has two columns and 500 rows, the 1st column has the persons name and the 2nd contains ages. I am trying to write a script which will look for all 500 data (person name) from excel from in the JMP data file and copy the age value corresponding to the person's name in the excel file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 13:30:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251503#M49381</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-10T13:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251506#M49383</link>
      <description>&lt;P&gt;This case would be a good time to import the Excel workbook with the names and ages and then load them into an associative array for lookup.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 13:33:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251506#M49383</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-03-10T13:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251526#M49391</link>
      <description>Hi mark,&lt;BR /&gt;&lt;BR /&gt;Thanks for the suggestions. I am new to the JMP could you please suggest how I can start ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2020 14:46:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251526#M49391</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-10T14:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251549#M49394</link>
      <description>&lt;P&gt;While&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt; suggestion of using an Associative Array, will work, I believe that a simple Join will probably solve the problem.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open the JMP table with 10,000 rows&lt;/LI&gt;
&lt;LI&gt;Open in JMP, the Excel file&lt;/LI&gt;
&lt;LI&gt;Using the JMP table from Excel as the base table, use
&lt;OL&gt;
&lt;LI&gt;Tables==&amp;gt;Update &amp;nbsp; &amp;nbsp;&amp;nbsp; to match the names and add in the ages to the base table&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Save the updated table back as an Excel file&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I suggest you take the time to read the documentation&amp;nbsp; "Discovering JMP" and "Using JMP"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;JMP Documentation Library&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 15:30:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251549#M49394</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-10T15:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251558#M49398</link>
      <description>&lt;P&gt;Here is a functioning example to learn from:&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 );

// open reference data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// make container for lookup
lookup  = Associative Array();

// get names and ages for lookup
For Each Row(
	Insert Into( lookup, dt:name, dt:age );
);

Close( dt, No Save );

// open new table (use Big Class again, delete existing age column)
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Delete Columns( :age );

// make new age column and populate it using lookup table
dt &amp;lt;&amp;lt; New Column( "new age", "Numeric", "Continuous" );
For Each Row(
	:new age  = lookup[ :name ];
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 16:08:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/251558#M49398</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-03-10T16:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613641#M81365</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;I have a similar task, but my "key" is a continuous data type.&lt;/P&gt;&lt;P&gt;In Excel it is very easy to create a look-up table and use it to transform highly un-linear characteristics.&lt;/P&gt;&lt;P&gt;In this case it is battery voltage data to estimates of state-of-charge (SoC) and vice versa. So, I would like to convert e.g. a data table with measured voltage data to SoC estimates. One challenge is that my look-up table may/will not have all the many voltage levels existing in the data, so I need the SoC corresponding to the nearest voltage level. E.g. voltage data is 3.801 V and look-up table has 3.800 V as the nearest and a corresponding SoC of 51%.&lt;/P&gt;&lt;P&gt;Sometimes my task is to convert "backwards" (SoC =&amp;gt; voltage), but hopefully I could create that solution on my own given good inspiration ;)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR, Kim.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 12:40:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613641#M81365</guid>
      <dc:creator>KimRas2</dc:creator>
      <dc:date>2023-03-17T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613669#M81367</link>
      <description>&lt;P&gt;If I understand correctly what you want to do (basically join by minimum distance) there are quite a few ways of doing this (kdtable, vptree, loc, distance, addins, ...). Below is one example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt_lookup = New Table("Untitled",
	Add Rows(3),
	Compress File When Saved(1),
	New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([3.8, 4.8, 4])),
	New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([50, 52, 51]))
);

dt = New Table("Untitled",
	Add Rows(3),
	Compress File When Saved(1),
	New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([3.801, 4.801, 4.000, 3.7, 4.802, 4.799]))
);

lookup_values = Column(dt_lookup, "Column 2") &amp;lt;&amp;lt; get values;
search_values = Column(dt_lookup, "Column 1") &amp;lt;&amp;lt; get values;

dt &amp;lt;&amp;lt; New Column("Column 2", Numeric, Continuous, &amp;lt;&amp;lt; Set Each Value(
	As Constant(tab = KDTable(search_values););
	{rows, dist} = tab &amp;lt;&amp;lt; K nearest rows(1, Matrix(:Column 1));
	lookup_values[rows[1]];
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are some demonstrations for other options using matrices&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
lookup_values = [50, 52, 51];
search_values = [3.8, 4.8, 4];
search_val = 4.3;

// These should return row from dt_lookup
kdt = KDTable(search_values);
{kd_rows, kd_dist} = kdt &amp;lt;&amp;lt; K nearest rows(1, Matrix(search_val));

vpt = VPTree(search_values);
{vp_rows, vp_dist} = vpt &amp;lt;&amp;lt; K nearest rows(1, Matrix(search_val));

dist = Distance(search_values, Matrix(search_val));
lmin_dist = LocMin(dist);

abs_calc = Abs(search_values - search_val);
lmin_abs = LocMin(abs_calc);

show(dist, lmin_dist, abs_calc, lmin_abs, kd_rows, kd_dist, vp_rows, vp_dist);

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2023 14:03:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613669#M81367</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-17T14:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search the string in Column and copy the numeric value in 2nd column</title>
      <link>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613740#M81381</link>
      <description>&lt;P&gt;interpolate( ) would also be a good choice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 17:47:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-the-string-in-Column-and-copy-the-numeric-value-in-2nd/m-p/613740#M81381</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-17T17:47:16Z</dc:date>
    </item>
  </channel>
</rss>

