The stars that populate the solar neighbourhood were formed in stellar clusters. Through N-body simulations of these clusters, we measure the rate of close encounters between stars. By monitoring the interaction histories of each star, we investigate the singleton fraction in the solar neighbourhood. A singleton is a star which formed as a single star, has never experienced any close encounters with other stars or binaries, or undergone an exchange encounter with a binary. We find that, of the stars which formed as single stars, a significant fraction is not singletons once the clusters have dispersed. If some of these stars had planetary systems, with properties similar to those of the Solar System, the planets' orbits may have been perturbed by the effects of close encounters with other stars or the effects of a companion star within a binary. Such perturbations can lead to strong planet–planet interactions which eject several planets, leaving the remaining planets on eccentric orbits. Some of the single stars exchange into binaries. Most of these binaries are broken up via subsequent interactions within the cluster, but some remain intact beyond the lifetime of the cluster. The properties of these binaries are similar to those of the observed binary systems containing extrasolar planets. Thus, dynamical processes in young stellar clusters will alter significantly any population of Solar System-like planetary systems. In addition, beginning with a population of planetary systems exactly resembling the Solar System around single stars, dynamical encounters in young stellar clusters may produce at least some of the extrasolar planetary systems observed in the solar neighbourhood.