create a vector, “ret” and asign 10 return values (see section 2.3)
ret <- c(1, 2, 3, 4, 5)
years <- c("2001", "2002", "2003", "2004", "2005")
names(ret) <- years
ret
## 2001 2002 2003 2004 2005
## 1 2 3 4 5
return <- c(1, 2, 3)
days <- c("monday","tuesday", "wednesday")
names(return) <- days
return
## monday tuesday wednesday
## 1 2 3
plot(return, type ="l")
return[1:2]
## monday tuesday
## 1 2
return [c("tuesday","wednesday")]
## tuesday wednesday
## 2 3