def format_repeated_vector(vector):
    """Creates string out of a vector with the PARTISN format for repeated
    numbers.

    Parameters:
    -----------
    vector: list
        Desired list to be formatted

    Returns:
    --------
    string: string
        Formatted string representation of the vector

    Example:
        vector = [1, 2, 0, 0, 0, 7, 8, 3, 3]
        string = "1 2 3R 0 7 8 2R 3"
    """

    # put vector into a list of lists formatted as
    # [[number , R], [number, R], ...]
    # where 'R' is the number of times that 'number' is repeated
    tot = 0
    repeats = []
    for i, val in enumerate(vector):
        if tot == 0:
            repeats.append([val, 1])
            tot += 1
        else:
            if val == repeats[tot-1][0]:
                repeats[tot - 1][1] += 1
            else:
                repeats.append([val, 1])
                tot += 1

    # make into a string of characters
    string = ""
    n = 0
    for pair in repeats:
        if pair[1] == 1:
            string += "{} ".format(pair[0])
            n = + 1
        else:
            string += "{0}R {1} ".format(pair[1], pair[0])
            n += 2

    return string