gge-ucd / Discussion

Class discussion for R-DAVIS course
0 stars 4 forks source link

Error in exercise 2: basic variables #10

Closed cadlam closed 7 years ago

cadlam commented 7 years ago

When trying exercise 2 in 'Intro to R/Rstudio' ("basic variables"), I entered the following program as instructed:

mass_kg <- 2.62 mass_g <- mass_kg * 1000 print(mass_g)

and what I get back is :

print(mass_g) Error in print(mass_g) : object 'mass_g' not found

What am I supposed to do @ryanpeek ?

ryanpeek commented 7 years ago

@cadlam Let's take a look in class...if you copy and paste that exact bit into your console (see code below) it should work. I suspect it's a typo, or you didn't run one of the first couple lines, so the computer can't find mass_kg to use it to generate mass_g.

mass_kg <- 2.62 mass_g <- mass_kg * 1000 print(mass_g)