When trying to simulate or model biological data from (sub)clonal
populations of cells, we need vectors that keep track of the fraction
of cells belonging to each clone. These vectors can only contain
non-negative entries, and the entries must add up to one. (We
thought about calling these things "ClonalFractions", but that seems
overly specialized for a notion that is likely to prove useful in
other contexts.) Such vectors of length d
can also be viewed as
points of a d-dimensional simplex.
We have implemented WeightVector
s as an S4 class, primarily so
we can enforce the defining properties. We also expect this design to
make it easier to use them as slots in other classes.