title: Apply function to each row in dataset when conditions are met
body: <p>I have a boolean variable (parent_boolean). If parent_boolean = True then I want to apply a function to table_name, if parent_boolean = False then I want to apply a different function to table_name in the data set. What is the easiest way to do this in DPLYR? </p>
  
  <pre><code>table_name    parent_table  parent_boolean column_count
   &lt;chr&gt;                                             &lt;chr&gt;                              &lt;lgl&gt;             &lt;dbl&gt;
  1 table_1       table_1      TRUE                     1
  2 table_2       table_1     FALSE                     3                                      
  
  dp_child &lt;- function(table_name, parent_table) { function runs SQL statement against database) 
  
  dp_parent &lt;- function(table_name) {function runs SQL statement against database) 
  </code></pre>
  
  <p>I want to run the dp_parent function on each row that the table_name is the parent_table and I want to run the dp_child function on each row that the table_name is not the parent_table. </p>