################################################################################ ### R BASICS WORKSHOP ### ### EXERCISE 9.1: Flow Control ### ### ### ### Center for Conservation and Sustainable Development ### ### Missouri Botanical Garden ### ### Website: rbasicsworkshop.weebly.com ### ################################################################################ ## TASK 1 ## ## Write a for loop that prints on the screen values from 1 to 100 ## TASK 2 ## ## Write a for loop that prints on the screen values from 5 to 123 ## TASK 3 ## ## Write a for loop that prints on the screen values 66 to 33 ## TASK 4 ## ## Write a for loop that raises to the power of 2 each element of the ## following vector. x <- c(3,4,6,2,4,9) ## TASK 5 ## ## Modify the loop above to save values in a vector named *y* ## TASK 6 ## ## Write a for loop that returns the cumulative multiplication of the vector ## *y* you produced above ################################################################################ ### TASK SOLUTIONS ############################################################# ################################################################################ # Sorry, no solutions this time!