Causal mediation analysis involves the decomposition of the effect of a treatment or exposure into causally interpretable indirect (through a mediator) and direct effects. The basic single-mediator situation has been extended to allow multiple ordered or unordered mediators. Recently, a generalized causal mediation and path analysis methodology has been developed, allowing for a sequence (two stages) of mediators with multiple mediators at each stage. Outcomes (including mediators) may be of different types following generalized linear models, and unsaturated models and clustered data are accommodated. This methodology can be implemented using a new R package called gmediation. Following an overview of the statistical method, the use of the package will be explained and illustrated using data from a dental caries cohort study. Possible future directions for causal mediation analysis and the gmediation package will be discussed.