FMH wrote:
Dear All,

I have a series of data in which the first column consist of a combination of 
date and time, for instance 17 April 2008 at 4.01pm, such data is recorded as:

4/17/2008 16:01
I'd like to seperate it into four different columns which consist of Day, 
Month,Year and Time, respectively.

Could someone please advice me on this mater?
Use xts.

Specify a POSIXlt index

All of the properties will be available in POSIXlt.

However, you didn't state what you wish to accomplish. It is likely that xts will be able to subset anything you need without splitting things up.

Realize that using a real time series class will always perform better than using a data frame.

Cross-posting is considered rude. If you need more help than the above, please make your query specific to some problem in finance, to keep the list focused on its topic (finance), or only reply to r-help.

It would be polite to sign your name too...

Regards,

   - Brian

--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

______________________________________________
R-help@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.

Reply via email to