This function is used for calculating the r-index

The definition of r-index is:  putting a researcher's article in a
descending  way by citation, the square root of the summation of  the
first h(the h-index) articles' citation is the r-index.