If your data are in a data frame, you have to give glm() the name of that data frame. If all of the data are in a data frame named Loans, you can use something like the following. I did not include all of the variables, just to save typing.
glm(formula = yngoodrisk ~ Line.of.Credit + Credit.Score + Monthly.Income, family = binomial(), data = Loans)