Unexpected symbol message using the lm function in code

A post was split to a new topic: How do you load a function into R?