title: error in could not find function in r with pipeline
body: <p>I'm just starting with r, so this may very well be a very simple question but...
  I've tried changing the name in 'a' to be more elaborate but this makes no difference
  If I try to assign it to a variable
  (e.g. <code>baseline &lt;- a %&gt;% filter(Period == &quot;Baseline&quot;) %&gt;% group_by(File)%&gt;%</code></p>
  <p>It just tells me:</p>
  <blockquote>
  <p>&quot;Error in a %&gt;% filter(Period == &quot;Baseline&quot;) %&gt;% group_by(File) %&gt;%  :
  could not find function &quot;%&gt;%&lt;-&quot;</p>
  </blockquote>
  <p>I'd really be grateful for any help with this.</p>
  <p>It keeps telling me &quot;Error in a(.) : could not find function &quot;a&quot;
  and that it is unable to find Baseline_MAP even though it is defined earlier.
  in mutate(Delta_MAP = Group_MAP - Baseline_MAP,</p>
  <pre><code>a &lt;- read_csv(&quot;file.csv&quot;)
  summary(a)
  
  a %&gt;%
    filter(Period == &quot;Baseline&quot;) %&gt;%
    group_by(File)%&gt;%
    summarise(Baseline_MAP = mean(MAP_Mean, na.rm=T), 
              Baseline_SBP = mean(SBP_Mean, na.rm=T),
              Baseline_LaserMc1 = mean(Laser1_Magic, na.rm=T),
              Baseline_Laser1 = mean(Laser1_Mean, na.rm=T))%&gt;%
    
  a%&gt;%
    filter(Period != &quot;Baseline&quot;) %&gt;%
    group_by(File)%&gt;%
    summarise(Group_MAP = mean(MAP_Mean, na.rm=T),
              Group_SBP = mean(SBP_Mean, na.rm=T),
              Group_Laser_1Magic = mean(Laser1_Magic, na.rm=T),
              Group_Laser_1 = mean(Laser1_Mean, na.rm=T))
  a%&gt;% 
    mutate(Delta_MAP = Group_MAP - Baseline_MAP,
           Delta_MAP_Log = log(Group_MAP)-log(Baseline_MAP),
           Delta_SBP = Group_SBP - Baseline_SBP,
           Delta_SBP_Log = log(Group_SBP)-log(Baseline_SBP),
           Delta_Laser1_Magic = Group_Laser_1Magic - Baseline_LaserMc1,
           Delta_Laser1_Log = log(Group_Laser_1Magic)-log(Baseline_LaserMc1))
  </code></pre>