Error: Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in 'x'

Thanks, @elmstedt for the detailed solution, it resolved my problem.