Skip to content
Prev 5946 / 15274 Next

using "to.weekly" on a zoo object

Hodgess, Erin wrote:
spc.wc <- Cl(to.weekly(spc))
?Cl

# or

spc.wc <- to.weekly(spc)[,"spc.Close"]

# or

spc.wc <- Cl(spc[endpoints(spc,on='weeks'),])
?endpoints


There is quite a lot of data in the list archives on to.period and endpoints. 
  Also, subsetting R objects is a FAQ, covered in any good introduction to R.

Regards,

     - Brian