Best way to replace :SS with :00

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Best way to replace :SS with :00

Arun.stat
probably :
a <- rep("HH:MM:SS", 5)
substring(a, 7) = "00"
a


Not sure if there is an R way to do this or a regular express way, but here
is what I am trying to do.

I've got lots of data where the format is HH:MM:SS, but I need to format it
like HH:MM:00, i.e. round the second down to zero.

What is the best way to do this?

Thanks again.

Jason

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.