Re: [R] align

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Thu 19 May 2005 - 00:19:41 EST

Check out the 'locf' function in the 'its' package and the 'na.locf' function in the 'zoo' package.

On 5/18/05, Omar Lakkis <uofiowa@gmail.com> wrote:
> Is there a function in R that is similar to Splus's align?
>
> The idea is, if I have a data.frame, or an its object that is like this:
>
> 2002-01-03 5
> 2002-01-04 NA
> 2002-01-05 7
> 2002-01-06 NA
>
> I want to align it by the last value to this:
>
> 2002-01-03 5
> 2002-01-04 5
> 2002-01-05 7
> 2002-01-06 7
>
> TITLE:
> Function align
>
> USAGE:
> align(x, pos, how, error.how, localzone, matchtol, by, k.by,
> week.align, holidays)
>
> ARGUMENTS:
> x: argument, no default.
> pos: argument, no default.
> how: argument, `default = "NA".'
> error.how: argument, `default = "NA".'
> localzone: argument, `default = F.'
> matchtol: argument, `default = 0.'
> by: argument, no default.
> k.by: argument, `default = 1.'
> week.align: argument, `default = NULL.'
> holidays: argument, `default = timeDate().'
>
> DESCRIPTION:
>
> Align series object x to new positions
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 19 00:27:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:50 EST