We study the approximation of univariate and multivariate set-valued functions (SVFs) by the adaptation to SVFs of positive sample-based approximation operators for real-valued functions. To this end, we introduce a new weighted average of several sets and study its properties. The approximation results are obtained in the space of Lebesgue measurable sets with the symmetric difference metric. In particular, we apply the new average of sets to adapt to SVFs the classical Bernstein approximation operators, and show that these operators approximate continuous SVFs. The rate of approximation of Holder continuous SVFs by the adapted Bernstein operators is studied and shown to be asymptotically equal to the one for real-valued functions. Finally, the results obtained in the metric space of sets are generalized to metric spaces endowed with an average satisfying certain properties.