I have this dataframe:
str(df)
'data.frame': 258239 obs. of 9 variables:
$ Cod : num 1 1 1 3 3 3 3 3 3 3 ...
$ MZ : num 61602 61602 61602 60155 60155 ...
$ Subc : chr "t" "cs" "Ts”
$ Ct : chr "TR" "ES" "ES”
$ Dif abs : 'hms' num 07:00:00 NA 04:00:00 23:00:00 ...
..- attr(*, "units")= chr "secs"
$ SocR : chr "VILLA DEL SOL" "VILLA DEL SOL" "VILLA DEL SOL" "CLIENTE OCASIONAL" ...
$ Reg : chr "bs" "Bbs" "tyd" "bf" ...
$ group : chr "G24" "G26" "G26" "G22" ...
$ rps : chr "CAST" "DFGT" "REV" "EDY" ...
I would like to group the following columns: Reg, Ct, Subc and that the value is the mean of Dif abs (have NA values).
Thanks...