Dear all,
 
according to the Help-page of DateTimeClasses {base} I should be able to do

time - z

with

time    date-time objects
z       a numeric vector (in seconds) or an object of class "difftime".

However, on R version 2.6.0 (Windows XP) I get
> Sys.time() - as.difftime(c("0:3:20", "11:23:15"))
Time differences in mins
[1] 1191837998 1191837318
attr(,"tzone")
[1] ""
Warning message:
Incompatible methods ("-.POSIXt", "Ops.difftime") for "-" 


This works, on the other hand:
> Sys.time() - as.numeric(as.difftime(c("0:3:20", "11:23:15")))
[1] "2007-10-08 12:16:18 Westeuropäische Normalzeit" "2007-10-08 12:04:58 
Westeuropäische Normalzeit"


Am I understanding something wrongly?


Many thanks and best regards,
Stefan

____________________________________
Dr. Stefan Albrecht, CFA
Allianz Private Equity Partners GmbH
Königinstr. 19 | 80539 Munich | Germany

Phone: +49.(0)89.3800.18317
Fax: +49.(0)89.3800.818317
EMail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Web: www.apep.com <http://www.apep.com/> 


Allianz Private Equity Partners GmbH | Geschäftsführung: Wan Ching Ang, Karl 
Ralf Jung
Sitz der Gesellschaft: München | Registergericht: München HRB 126221 | 
Ust-ID-Nr.: DE 813 264 786

______________________________________________
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