Yes, you should load the data into a data frame. You can then use functions from the dplyr package to group the data and compute means. Here is an example using data I invented where E and C represent Estuary and Control and N and S represent North and South.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#Invent data
DF <- data.frame(Kind=c("E","E","E","E","C","C","C","C"),
Loc=c("N","S","N","S","N","S","N","S"),
Value=runif(n = 8,min = 10,max = 25))
print(DF)
#> Kind Loc Value
#> 1 E N 11.82269
#> 2 E S 10.01236
#> 3 E N 13.66709
#> 4 E S 12.81534
#> 5 C N 18.59053
#> 6 C S 23.57225
#> 7 C N 23.96505
#> 8 C S 12.88673
DF_means <- DF |> group_by(Kind,Loc) |> summarize(Avg=mean(Value))
#> `summarise()` has grouped output by 'Kind'. You can override using the `.groups` argument.
DF_means
#> # A tibble: 4 x 3
#> # Groups: Kind [2]
#> Kind Loc Avg
#> <chr> <chr> <dbl>
#> 1 C N 21.3
#> 2 C S 18.2
#> 3 E N 12.7
#> 4 E S 11.4
Created on 2021-11-27 by the reprex package (v2.0.1)