[R] howto convert matrix of numeric values to Date class?

jim holtman jholtman at gmail.com
Sat Sep 27 01:49:28 CEST 2008


You should be able to convert with:

myDate <- as.Date(dates, origin='1960-1-1')

On Fri, Sep 26, 2008 at 12:53 PM, Philip James Smith
<philipsmith at alumni.albany.edu> wrote:
> Hi:
>
> I have a matrix, named "mat," of numeric values that are in days since Jan
> 1, 1960.
>
> I want to convert them Date class values so that I can do things like
>
> seq( value , len=10, by="1 week")
>
> where "value" is any of the matrix elements.
>
> How do I do this?
>
> Please reply to: philipsmith at alumni.albany.edu
>
> Thanks!
> Phil Smith
> Duluth, GA
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list