Dec 2003 15:48:20 -0600
From: Erin Hodgess [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [R] Matrix to dates
Let's try again!
I have a matrix in which the first column is a four digit year, and the
second column is a 2 digit month.
How do I convert the matrix to a date function
Hello again R People:
If I have a matrix with 2 columns
z1
1960 1
1960 9
1961 6
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Let's try again!
I have a matrix in which the first column is a four digit year, and the
second column is a 2 digit month.
How do I convert the matrix to a date function, please?
Thanks,
Erin
Version 1.8.0
mailto: [EMAIL PROTECTED]
__
[EMAIL
See ?DateTimeClasses, ?strptime, and ?as.character
This example from strptime should get you going:
## read in date/time info in format 'm/d/y h:m:s'
dates - c(02/27/92, 02/27/92, 01/14/92,
02/28/92, 02/01/92)
times - c(23:03:20, 22:29:56, 01:03:30,