S+ is giving me a strange error in some previously
working code (simple code).
cat("\n Time conversion from dd/mm/year to dd-mon-yy
\n")
MyTime <- as.character(MyTime)
cat("\n --- MyTime --- \n")
print(MyTime[1:10])
cat("\n")
MyTime <- dates(MyTime, format="dd/mm/year",
out.format="dd-mon-yy")
MyTime <- as.character(MyTime)
The data MyTime is printed as:
--- MyTime ---
[1] "09/09/2005" "08/09/2005" "07/09/2005"
"06/09/2005" "05/09/2005" "04/09/2005" "03/09/2005"
[8] "02/09/2005" "01/09/2005" "31/08/2005"
whereas S+ is claiming it is seeing mm/dd/year
the exact error message is:
1: wrong number of fields in entry(ies) 1, 2 in:
unpaste(dates., sep = fmt$sep, fnames =
fmt$periods, nfields = 3)
2: 2701 missing values generated coercing from
character to numeric in: as.numeric(out$y)
Problem in convert.dates(dates., format = fmt, origin
= origin..: format mm/dd/year may be
incorrect
Are there any global flags which could result in this
error?
The MyTime variable originally derives from an excel
file and this code has regularly worked previously,
further restarting S+ results in the same error
messages.
Any help appreciated
TIA
Jefe
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail
http://uk.messenger.yahoo.com
|