Counting the number of local extrema of the cumulative sum of data points yields the R-test, a new single-sample non-parametric test. Numeric simulations indicate that the R-test is more powerful than Student's t-test for semi-heavy and heavy-tailed distributions, equivalent for Gaussian variables and slightly worse for uniformly distributed variables. Finally the R-test has a greater power than the single-sample Wilcoxon signed-rank test in most cases.