replace inf values with na in r