KmL: k-means for longitudinal data. KmL, a new package implementing k-means is presented. The advantage of KmL over existing procedures is that it is designed to work specifically on longitudinal data. This package is able to deal with missing values. It also provides an easy way to run the algorithm several times, varying the starting conditions and the number of clusters looked for. Its graphical interface helps the user to choose the appropriate number of clusters when the classic criterion is not efficient. Simulations on both artificial and real data are presented. Performance of $k$-means on longitudinal data is compared to Proc Traj results. The simulations have shown that KmL (like Proc Traj) gives acceptable results for all polynomial examples, even with high levels of noise. KmL gives much better results on non-polynomial trajectories. It is also remarked that KmL is not model-based, which can be an advantage (nonparametric, more flexible) but also a disadvantage (no scope for testing goodness of fit).