More Variables (Expressions and Variables)

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 the grams and number 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.
Expected outputs for More Variables