title: Date Difference within a group in R and creating a new column based on certain conditions
body: <p>Need assistance in creating a new data frame which will have columns called Name and Value_2. 
  Existing data frame includes columns like Name, Date and Value_1. The new data frame will be created using an existing data frame which follows a condition. Below is the existing data frame for better clarity:-</p>
  
  <pre><code>Name    Date       Value_1
  A       9/28/2011  12345
  A       1/8/2012   23456
  A       6/3/2013   78910
  B       10/4/2010  438504
  B       10/14/2013 439587
  C       8/22/2013  436096
  D       4/20/2010  3258043
  D       3/24/2013  968347
  D       7/8/2013   954733
  D       8/19/2013  438578
  </code></pre>
  
  <p>In group name A, the first test was conducted on 9/28/2011 with a value_1 of 12345 and the last test was conducted on 6/3/2013 with a value_1 of 23456. Hence the value_2 in a new data frame follows a condition to check if log10(12345 ) -log10(23456) >=2 and categorize group name A into Yes/No in value_2 column of ne data frame. A similar condition needs to be followed with other groups as well. Below is the desired output for your reference :-</p>
  
  <pre><code>Name    Value_2
  A       No
  B       Yes
  C       Yes
  D       No
  </code></pre>
  
  <p>Value_2 here follows the condition of log10(first test date value_1)-log10(last test date value_1)>=2.</p>