RECYCLING RULE 
//////////////////////////////////////////////////////////

4.24 RECYCLING RULE 
The recycling rule applies when the long vector is n times the short vector. 
	> y<-1:6
	> x<-2:3
	> data.frame(x,y)
	  x y
	1 2 1
	2 3 2
	3 2 3
	4 3 4
	5 2 5
	6 3 6
However, when the long vector is not the multiple of the short vector, an error message appears. 
	> x<-2:5
	> y<-1:6
	> data.frame(x,y)
	Error in data.frame(x, y) : 
	  arguments imply differing number of rows: 4, 6

//////////////////////////////////////////////////////////

X[1] AND X[[1]]
//////////////////////////////////////////////////////////

It is vital to separate x[[1]] from x[1]. ‘[[...]]’ is used to select a single element,
 whereas ‘[...]’ is a general subscription operator. Thus, the former is the first object 
in the list x; if it is a named list, the name is not included. The latter is a sublist of
 list x, consisting of only the first entry. The names are transferred to the sublist if 
it is a named list. Pay attention to the difference between x[1] and x[[1]]. 

> x[[1]]
[1] "John"
> x[1]
$name
[1] "John"
> typeof(x[[1]])
[1] "character"
> typeof(x[1])
[1] "list"
We know the 4th data item has two data points: 14 and 7. 
> x[[4]]
[1] 14  9
To go to the next level, we use [[]][] structure. To get the first item, i.e., 14, we use x[[4]][1].
> x[[4]][1]
[1] 14
//////////////////////////////////////////////////////////