I'm using the zoo and xts package for analysing financial data. ts package is not very suitable since financial series have weekend with no data available.
I read about the apply function availbale in the xts package
apply.daily(x, FUN, ...)
apply.weekly(x, FUN, ...)
apply.monthly(x, FUN, ...)
apply.quarterly(x, FUN, ...)
apply.yearly(x, FUN, ...)
this apply function over calendar periods and thought that something like that will work in order to get the end of week value but it seems not to work.
apply.weekly(x, tail)