Ecologists and evolutionary biologists are relying on an increasingly sophisticated set of statistical tools to describe complex natural systems. One such tool that has gained increasing traction in the life sciences is structural equation modeling (SEM), a variant of path analysis that resolves complex multivariate relationships among a suite of interrelated variables. SEM has historically relied on covariances among variables, rather than the values of the data points themselves. While this approach permits a wide variety of model forms, it limits the incorporation of detailed specifications. Here, I present a fully-documented, open-source R package piecewiseSEM that builds on the base R syntax for all current generalized linear, least-square, and mixed effects models. I also provide two worked examples: one involving a hierarchical dataset with non-normally distributed variables, and a second involving phylogenetically-independent contrasts. My goal is to provide a user-friendly and tractable implementation of SEM that also reflects the ecological and methodological processes generating data.