We had two Wire Hair Fox Terriers - Teddy and Chloé on our R-25. We only have one today 🙁 ). After Teddy we took on Jake at 8 weeks old. Both Chloé and Jake adapted quickly to the boat. At first they were very suspicious of the boat, the vibration and the noises it made. Over time they adapted well and typically resigned to hang out in some place on the boat. The places they lay down at varied; under dinette table, V-berth and even at my feet at the helm. We now only have Jake who's 6 yrs old. He's extremely attached to me and does not ever like losing sight of me. I suspect he will be very happy to sit alongside me on the double wide helm seat in our new 2018 R-27.
I'm sure how a dog adapts depends on breed, temperament, age, size, weight, etc. Some will adapt while others never will and be difficult. Starting early on with a youngish dog will likely be successful.
My concern with Terriers such as we have is their intensive curiosity with every thing around them, and of course the instinctive need to bark at things. Jake was being walked at a local marina, saw a seagull perched on the marina wall separating it from the sea outside, and made a run at it. The leash spun out to a max length of around 30 feet very quickly and caught me by surprise. Before the 30 feet was exhausted Jake took a running leap at the seagull, the seagull simply took off but Jake kept going and disappeared on the far side of the wall and straight into the sea. He had a harness on but stretching down over the wall was to much for me as leaning much further would have meant I would join Jake in the sea. Thank goodness another Tugnut person saw my plight and came over quickly to help me.
You just don't know what a dog is apt to do in new situations. For me, having Jake be in the cockpit I have no choice but to attach a line to his harness with enough slack for him to wander about but not enough for him to fly over the side.
Take time to allow your dog to adapt to the boat and I suspect so long as you're in sight that should be comforting to him/her.