I see, I have to learn really much... Sorry @all for my confused approach.
Now, I have created a reprex from the original data and it's strange. I created a dataset with 6 cases (mydata) and all is fine. But if I waive the case selection, I get the same error as always. The next problem is, that when I create the reprex, I get more error messages...
``` r
data.frame(
degree = c(313.922112119583,340.090834916981,
275.479983711446,205.458659115787,3.96963691809708,325.187911117228),
dir = as.factor(c("GWTL", "GWTL", "ING", "ING", "BP", "BP"))
)
#> degree dir
#> 1 313.922112 GWTL
#> 2 340.090835 GWTL
#> 3 275.479984 ING
#> 4 205.458659 ING
#> 5 3.969637 BP
#> 6 325.187911 BP
Created on 2022-02-01 by the reprex package (v2.0.1)
library(dplyr)
#> Warning: Paket 'dplyr' wurde unter R Version 4.0.5 erstellt
#>
#> Attache Paket: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(magrittr)
#> Warning: Paket 'magrittr' wurde unter R Version 4.0.5 erstellt
library(circular)
#> Warning: Paket 'circular' wurde unter R Version 4.0.5 erstellt
#>
#> Attache Paket: 'circular'
#> The following objects are masked from 'package:stats':
#>
#> sd, var
mydata %>%
dplyr::group_by(dir) %>%
summarise(
circ_mean =
circular::circular(degree, units = "degrees", rotation = "counter", zero=0, modulo="2pi")%>%#data to circular format
circular::mean.circular())
#> Error in dplyr::group_by(., dir): Objekt 'mydata' nicht gefunden
Created on 2022-02-01 by the reprex package (v2.0.1)