How to parse milliseconds in R?

Answer

Courtesy of the ?strptime help file (with the example changed to your value):

 z <- strptime("2010-01-15 13:55:23.975","%Y-%m-%d %H:%M:%OS")
 z # prints without fractional seconds
 op <- options(digits.secs=3)
 z
 options(op)#reset options

All r Questions

Ask your interview questions on r

Write Your comment or Questions if you want the answers on r from r Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---