Answers to the exercises are available here. Exercise 1 Consider 3 vectors, day, month and year: year=c(2005:2016) month=c(1:12) day=c(1:31) Define a list Date such as: Date= $year [1] 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 $month [1] 1 2 3 4 5 6 7 8 9 10 11 12 $day […]
list
List exercises
In the exercises below we cover the basics of lists. Before proceeding, first read section 6.1-6.2 of An Introduction to R, and the help pages for the sum, length, strsplit, and setdiff functions. Answers to the exercises are available here. Exercise 1 If: p