Summary: Many questions in ecology and evolutionary biology consider response variables that are functions (e.g. species-abundance distributions) rather than a single scalar value (e.g. species richness). Although methods for analysing function-valued data have been available for several decades, ecological and evolutionary applications are rare. We outline methods for regression when the response variable is a function ('function regression') and introduce the r package FREE, which focuses on straightforward implementation and interpretation of function regression analyses. Several computational methods are implemented, including machine learning and several Bayesian methods. We compare different methods using simulated data and real ecological data on individual-size distributions (ISDs) of fish and trees. No single method performed best overall, with several performing equally well for a given data set. Which method to use depends on sample sizes and the questions being considered; in many cases, a consensus approach should be used to combine or compare fitted models. Function regression allows the direct modelling of many function-valued data (e.g. species-abundance distributions) rather than having to reduce those functions to a single scalar response variable (e.g. species diversity or functional diversity indices). Our ecological examples using ISD data show that larger rivers support more-even fish-size distributions than smaller rivers and that low initial planting densities lead to more-even tree-size distributions than high initial planting densities. Function regression provided more informative and intuitive interpretations of these data than conventional non-function-valued approaches.