  Adaptive seamless designs combine confirmatory testing, a domain of phase III
trials, with features such as treatment or subgroup selection, typically
associated with phase II trials. They promise to increase the efficiency of
development programmes of new drugs, e.g. in terms of sample size and / or
development time. It is well acknowledged that adaptive designs are more
involved from a logistical perspective and require more upfront planning, often
in form of extensive simulation studies, than conventional approaches. Here we
present a framework for adaptive treatment and subgroup selection using the
same notation, which links the somewhat disparate literature on treatment
selection on one side and on subgroup selection on the other. Furthermore, we
introduce a flexible and yet efficient simulation model that serves both
designs. As primary endpoints often take a long time to observe, interim
analyses are frequently informed by early outcomes. Therefore, all methods
presented accommodate both, interim analyses informed by the primary outcome or
an early outcome. The R package asd, previously developed to simulate designs
with treatment selection, was extended to include subpopulation selection
(so-called adaptive enrichment designs). Here we describe the functionality of
the R package asd and use it to present some worked-up examples motivated by
clinical trials in chronic obstructive pulmonary disease and oncology. The
examples illustrate various features of the R package providing at the same
time insights into the operating characteristics of adaptive seamless studies.
