I have a set of coordinates:
d1 <- data_frame(
title = c(\"base1\", \"base2\", \"base3\", \"base4\"),
lat = c(57.3, 58.8, 47.2, 57.8, 65.4, 56.7, 53.3),
long
First you need a file containing coastlines of UK.
You can use the method provided in this question to know whether a point falls inside the UK coastlines or outside.
Then, for points that fall into the UK, you can compute the Haversine distance between them and the coast line points, to determine if they are in your 3 miles from the coast.