It's the R train in this case, but the F train will do just as well.
Sorry I keep editing this one. I have another photo showing how to get to the ocean, going in the other direction. (Water, water everywhere--but it is hard to get good oceanview pics.)
Oh, and my icon above applies also--the Brooklyn Bridge over the East River. The East River, in fact, is not a real river but part of the ocean--a tidal estuary that opens onto the ocean--look one way and one is looking out to sea, look the other direction it looks like a river--hence the name.