Perfect!
Then you can just add a grouping variable, i.e. a column that indicates the site of the observation to your oceans data and then use the code I have shown you before.
If you just use this code:
oceans$Site<-rep(c("Site A","Site B"),each=500)
You will get a column called Site which contains 500 times "Site A" and 500 times "Site B". You can, of course, use other names or numbers for the site labels.
Here's the whole example:
library(lattice)
#generate dummy data
set.seed(123)
oceans<-data.frame(ID=1:1000,
depth=rnorm(1000,mean = 100,sd=25))
head(oceans)
#> ID depth
#> 1 1 85.98811
#> 2 2 94.24556
#> 3 3 138.96771
#> 4 4 101.76271
#> 5 5 103.23219
#> 6 6 142.87662
# add Site column as grouping variable
oceans$Site<-rep(c("Site A","Site B"),each=500)
#plot the histogram
histogram(~depth|Site, data = oceans, type= 'density',main="Ocean depth",
scales=list(alternating=FALSE),
panel = function(x, ...){
panel.histogram(x, col = "blue", ...)
panel.densityplot(x, lwd = 2, col = 'red')
}
)

Created on 2020-11-05 by the reprex package (v0.3.0)