title: “R Homework 2” author: “Gabby Krochmal” date: “Ecology Lab - Summer 2017” output: html_document: fig_caption: yes fig_height: 5 fig_width: 5 highlight: tango theme: default toc: yes toc_float: collapsed: no smooth_scroll: no pdf_document: fig_caption: yes fig_crop: no highlight: tango number_sections: no header-includes: - - geometry: margin=1in fontsize: 11pt —
object1 <- 5 #here I assigned a number to the object
object2 <- 2 #here I assigned another number to a different object
object1 * object2 #here I mulitpied both objects
[1] 10
object3 <- object1*object2 #here I assigned the results to another object
cat <- c(2,4,6) #assigned a vector to cat
dog <- c(1,3,5) #assigned a vector to dog
cat * dog #multiplied cat * dog
[1] 2 12 30 #results
horse <- cat * dog #created a new object from the results