You need the day to convert to a date format. Assuming day=15:
x.date <- as.Date(paste(as.character(x),"-15",sep=""),format="%Y-%m-%d")
-----Original Message-----
From: alessandro carletti [mailto:alxmilton at yahoo.it]
Sent: Wednesday, August 10, 2005 9:37 AM
To: rHELP
Subject: [R] date format
Hi,
I have a problem with a vector (x) containing dates in
format "yyyy-mm" (I'm working with monthly means): how
can I convert it in date format, so that I can plot it
recognising trends for my variables?
class(x) says: factor
Thanks
Alex