Many real-world systems are profitably described as complex networks that grow over time. Preferential attachment and node fitness are two simple growth mechanisms that not only explain certain structural properties commonly observed in real-world systems, but are also tied to a number of applications in modeling and inference. While there are statistical packages for estimating various parametric forms of the preferential attachment function, there is no existing package for a non-parametric estimation, which would allow finer inspections on the famous `rich-get-richer’ phenomenon as well as provide clues to explain non-standard structural properties observed in real-world networks. This paper introduces the R package PAFit, which implements statistical methods for estimating the preferential attachment function and node fitness non-parametrically, as well as a number of functions for generating complex networks from these two mechanisms. The main computational part of the package is implemented in C++ with OpenMP to ensure scalability to large-scale networks. In this paper, we first introduce the main functionalities of PAFit through simulated examples, and then use the package to analyze a collaboration network between scientists in the field of complex networks. The results indicate the joint existence of `rich-get-richer’ and `fit-get-richer’ phenomena in the collaboration network. The estimated attachment function is almost linear, which means that the probability an author develops a new collaboration is proportional to their current number of collaborators. Furthermore, the estimated fitnesses reveal many familiar names of the complex network field as top fittest scientists.