Dust Attenuation in the Nearby Universe: A Comparison between Galaxies Selected in the Ultraviolet and in the Far-Infrared