bartels.test: Ranked Version of von Neumann's Ratio Test for Randomness

Description

This function performs the Bartels test for randomness which is
based on the ranked version of von Neumann's ratio (RVN). Users can
choose whether to test against two-sided, negative or positive
correlation. NAs from the data are omitted.