class: left, bottom background-image: url("images/contour.png") background-position: right background-size: auto # Vector Data Containers <p> </p> <p> </p> <img src="images/logo1.svg" width="400px"> --- class: sectionTitle # Caveats --- # The Recycling Rule Operations on vectors that expect a particular length are handled (somewhat gracefully) using the <div class="box-green">*Recycling Rule*: The shorter of the two vectors will be stretched by reusing values from the start to equal the length of the larger vector.</div> -- ```r x <- c(10,20,30) y <- c(1,2,3,4,5,6,7,8,9) x + y ``` ``` ## [1] 11 22 33 14 25 36 17 28 39 ``` -- If the shorter vector length is not a clean multiple of the larger one, it will issue a warning to let you know in case these dangling parts could cause problems. ```r y <- 1:10 x + y ``` ``` ## Warning in x + y: longer object length is not a multiple of shorter object ## length ``` ``` ## [1] 11 22 33 14 25 36 17 28 39 20 ``` --- class: middle background-image: url("images/contour.png") background-position: right background-size: auto .center[ # Questions? ![Peter Sellers](images/peter_sellers.gif) ] <p> </p> .bottom[ If you have any questions for about the content presented herein, please feel free to [submit them to me](https://docs.google.com/forms/d/e/1FAIpQLScrAGM5Zl8vZTPqV8DVSnSrf_5enypyp0717jG4PZiTlVHDjQ/viewform?usp=sf_link) and I'll get back to you as soon as possible.]