This paper presents the AffineMortality R package which performs parameter estimation, goodness-of-fit analysis, simulation, and projection of future mortality rates for a set of affine mortality models for use in pricing and reserving. The computational routines build on the univariate Kalman Filtering approach of Koopman and Durbin ((2000). Journal of Time Series Analysis, 21(3), 281–296.) along other numerical methods to enhance the robustness of the results. This paper provides a discussion of how the package works in order to effectively estimate and project survival curves, and describes the available functions. Illustration of the package for mortality analysis of the US male data set is provided.