As far as my thinking is concerned, the answer would be "yes". If we analyse Hamlet's soliloquy "to be or not to be, that is the question", it remarks about the problem that one comes across at every moment of one's life. Whether it be a matter of opting for a degree or for a career or any other philosophical, psychological or behavioural problem. We always have two options in front of us and we have to choose for one. In "The Road not Taken", we see the last stanza as: "…two roads diverged and I/ took the one less traveled by/ that has made all the difference".
The real problem of Hamlet is hidden in this question: "to be or not to be" and hence we can see that there are two roads diverging in front of him. One road leads to the "sea of troubles" and the other one leads to "suffer in the mind". He has to opt for one and co-incidentally, he opts for the road "less traveled by" and ultimately a situation rises where "that has made all the difference". So, in this way we can relate Hamlet's soliloquy to Frost's "The Road not Taken"
The real problem of Hamlet is hidden in this question: "to be or not to be" and hence we can see that there are two roads diverging in front of him. One road leads to the "sea of troubles" and the other one leads to "suffer in the mind". He has to opt for one and co-incidentally, he opts for the road "less traveled by" and ultimately a situation rises where "that has made all the difference". So, in this way we can relate Hamlet's soliloquy to Frost's "The Road not Taken"