def get_sinks_selection(sinks, p, R):
    """
    Select the sinks from the dataframe *sinks* within the distance *R* from
    the given point *p*.

    Parameters
    ----------
    sinks: DataFrame
        Dataframe of the sinks.
    p: Point or tuple
        Coordinates of the given point.
    R: float, optional
        Maximal distance from the point so that a street is selected.

    Returns
    -------
    DataFrame
        Dataframe of the selected sinks with indices from the dataframe
        *sinks*.
    """
    index = list()
    for idx, sink in sinks.iterrows():
        object = sink['geometry']
        d = object.distance(p)
        if d < R:
            index.append(idx)
    sinks_selection = sinks.loc[index]
    return sinks_selection
