def calculate_k(R, N):
    """
    Calculates the the Fisher concentration parameter (k) based on the number of
    vectors and the resultant vector length. This calculation occurs within the
    fisher_mean() function. Use of this function can be helpful when R and N
    are available, but the vectors themselves are not.

    Parameters
    ----------
    R : the resultant vector length
    N : number of vectors

    Returns
    -------
    k : the Fisher concentration parameter
    """
    if N != R:
        k = (N - 1.0) / (N - R)
    else:
        k = 'inf'
    return k
