  Given sparse collections of measurable sets $\mathcal S_k$, $k=1,2,\ldots
,N$, in a general measure space $(X,\mathfrak M,\mu)$, let $ \Lambda_{\mathcal
S_k}$ be the sparse operator, corresponding to $\mathcal S_k$. We show that the
maximal sparse function $ \Lambda f = \max _{1\le k\le N} \Lambda_{\mathcal
S_k} f $ satisfies \begin{align*}
  &\| \Lambda \| _{L^p(X) \mapsto L^{p,\infty}(X)} \lesssim \log N\cdot
\|M_{\mathcal S}\|_{L^p(X) \mapsto L^{p,\infty}(X)},\,1\le p<\infty, \\ &\lVert
\Lambda \rVert _{L^p(X) \mapsto L^p(X)} \lesssim (\log
N)^{\max\{1,1/(p-1)\}}\cdot \|M_{\mathcal S}\|_{L^p(X) \mapsto L^p(X)},\,
1<p<\infty, \end{align*} where $M_{\mathcal S}$ is the maximal function
corresponding to the collection of sets $\mathcal S=\cup_k\mathcal S_k$. As a
consequence, one can derive norm bounds for maximal functions formed from
taking measurable selections of one-dimensional Calder\'on-Zygmund operators in
the plane. Prior results of this type had a fixed choice of Calder\'on-Zygmund
operator for each direction.
