[R] Merging 2 files with different timestamp

David Winsemius dwinsemius at comcast.net
Sun May 22 22:44:56 CEST 2016


> On May 22, 2016, at 9:40 AM, Bhaskar Mitra <bhaskar.kolkata at gmail.com> wrote:
> 
> Hello, I am trying to merge two text files by using the timestamp
> header for both the files:
> 
> The first file has the following format for the timestamp:"2012-01-01
> 23:30:00 UTC"
> 
> Timestamp for the second file : 2012-01-01 2330.

> as.POSIXct("2012-01-01 23:30:00 UTC",format="%Y-%m-%d %H:%M:%S", tz="UTC")
[1] "2012-01-01 23:30:00 UTC"
> as.POSIXct( "2012-01-01 2330", format="%Y-%m-%d %H%M", tz="UTC")
[1] "2012-01-01 23:30:00 UTC"

> 

> I am having problems by converting from one timestamp format to another.
> Any suggestions/help in this regard?
> 
> regards,
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list