It's not possible to give an exact answer without a reprex
(See the (FAQ: What's a reproducible example (`reprex`) and how do I do one?).
To troubleshoot this, my recommendation is to start simply and to build to the more complex. The help page for rstatix::anova_test
has a good starting point
library(dplyr)
library(rstatix)
#>
#> Attaching package: 'rstatix'
#> The following object is masked from 'package:stats':
#>
#> filter
data("ToothGrowth")
df <- ToothGrowth
df %>% anova_test(len ~ dose)
#> Coefficient covariances computed by hccm()
#> ANOVA Table (type II tests)
#>
#> Effect DFn DFd F p p<.05 ges
#> 1 dose 1 58 105.065 1.23e-14 * 0.644
Created on 2020-02-29 by the reprex package (v0.3.0)
So, begin with
Dataovershootwithout means %>% anova_test(Condition ~ Distanceditalboundery) -> ANOVAtest
and start adding features from there.