#################### # Module 2 - Lab # 6/10/13 #################### ## In this lab you can use the interactive console to explore but please record your commands here. Remember anything you type here can be "sent" to the console with Cmd-Enter (OS-X) or Cntr-Enter (Windows/Linux). # 1. create a new variable called 'my.num' that contains 5 numbers # 2. mulitply 'my.num' by 2 # 3. create a second variable called 'my.char' that contains 3 character strings # 4. combine the two variables 'my.num' and 'my.char' into a variable called 'both' # 5. what is the length of 'both'? # 6. what class is 'both'? # 7. divide 'both' by 3, what happens? # 8. create a vector with elements 1 2 3 4 5 and call it x # 9. create another vector with elements 10 20 30 40 and call it y # 10. what happens if you try to add x and y together? why? # 11. append the value 50 onto the vector y (hint: you can use the c() function) # 12. add x and y together # 13. multiple x and y together. pay attention to how R performs operations on vectors of the same length.