[R-SIG-Finance] Simple Date Formatting

Gabor Grothendieck ggrothendieck at gmail.com
Sun Jan 3 21:08:20 CET 2010


If you truly have a matrix with one column being a date you are
starting off with the wrong class of object in the first place.  See
?read.zoo in the zoo package and the three vignettes (pdf documents)
that come with it.  You might also want to look at the xts package as
well.

On Sun, Jan 3, 2010 at 2:01 PM, R. Vince <rvince99 at earthlink.net> wrote:
> Suppose I have a matrix, X, whose leftmost column is a date in the format:
>
> 2009-07-10
>
> how do I alter it such that it is formatted as:
>
> 20090710
>
> without using string manipulations? Surely there mist be a common means for
> doing this? Also, how can I remove the rightmost column of a matrix prior to
> doing a write.table() ? Thanks so much -RVince



More information about the R-SIG-Finance mailing list