[1] 0.75
Expressions and variables more variables (solution)
Exercise
Calculate a total biomass in grams for 3 white-throated woodrats (Neotoma albigula) and then convert it to kilograms. The total biomass is three times the average size of a single individual. An average individual weighs 250 grams.
- Add a new section to your R script starting with a comment.
- Create a variable
grams
and assign it the mass of a single Neotoma albigula (250). - Create a variable
number
and assign it the number of individuals (3). - Create a variable
biomass
and assign it a value by multiplying thegrams
andnumber
variables together. - Convert the value of
biomass
into kilograms (there are 1000 grams in a kilogram so divide by 1000) and assign this value to a new variable. - Print the final answer to the screen.
Output solution