0

Why does "<<<<<<< HEAD" appear in my R script?

I think this refers to a Git Head, but I don't understand why it inserts itself in my code. When it inserts itself it breaks the code

Is there a way to prevent this?

AllAlliancePerformance <- Tab_PercentCompliant %>% 
  filter(ClaimsAdjudicatedThrough == VBP_Report_Date) %>% 
  group_by(SubMeasureID) %>% 
  summarise(Sum_AdaptedCompliant = sum(AdaptedCompliant, na.rm = FALSE),
            Sum_TotalEligible = sum(TotalEligible, na.rm = FALSE)) %>% 
  mutate(Percent_Compliant = Sum_AdaptedCompliant/Sum_TotalEligible) %>%
<<<<<<< HEAD
  mutate(NCQA_Mean = NCQA_MeanList) %>% 
  mutate(PerformanceLevel = (Percent_Compliant - NCQA_Mean))
=======
  #mutate(NCQA_Mean = Tab_PercentCompliant$AdaptedNCQAMean) %>% 
  mutate(PerformanceLevel = (Percent_Compliant - AdaptedNCQAMean))
>>>>>>> 90d29b1de468129cce7530d84a5f7771c33a74c6
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
John Ryan
  • 29
  • 5
  • 3
    Because there's a conflict git needs you to resolve. See e.g. https://stackoverflow.com/q/7901864/3001761 – jonrsharpe Feb 22 '23 at 21:15
  • 1
    Those are conflict markers. See [Resolving a merge conflict using the command line](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line) – Schwern Feb 22 '23 at 21:18

1 Answers1

1

Lines that begin with "<<<<<<<", "=======" and ">>>>>>>" are diff markers. Chances are, there was a merge conflict in your branch. Do git status to find out and if so, resolve the merge conflict (edit the file selecting the correct fix) and git add it (or ignore or cancel) and allow the merge to complete.

Richard
  • 26
  • 1