Probably, you found the answer already.
What I do NOT see in your command console the earlier statements like '> name <- "Mike Mackgrath"'. So earlier statement with 'name' is not executed. Select all the statements and try R. It will work.
------------------------------
Manash Sarma
------------------------------