[R] chron and mysql
Joel Allen
jallen at students.cas.unt.edu
Wed Feb 16 01:05:52 CET 2000
R 0.90.1
chron 2.2-2
MySQL 3.22.30
Attempts to create a chron object fail when using date and time data
from a mysql database. It appears that chron does not like 4 digit
years. Is this the problem?
my data look like:
> c.time[1:10,]
Date Time
1 2000-02-14 10:15:02
2 2000-02-14 10:17:03
3 2000-02-14 10:18:03
4 2000-02-14 10:19:03
5 2000-02-14 10:20:04
6 2000-02-14 10:21:04
7 2000-02-14 10:22:04
8 2000-02-14 10:23:05
9 2000-02-14 10:24:05
10 2000-02-14 10:26:06
the chron command looks like:
>
time.stamp<-chron(as.character(c.time[,"Date"]),c.time[,"Time"],format=c("y/m/d","h:m:s"))
Error in convert.dates(dates., format = format[[1]], origin = origin.) :
format y/m/d may be incorrect
In addition: Warning messages:
1: 1796 entries set to NA due to wrong number of fields in:
unpaste(dates., sep = fmt$sep, fnames = fmt$periods, nfields = 3)
2: NAs introduced by coercion
3: NAs introduced by coercion
4: NAs introduced by coercion
Thanks,
Joel Allen
Institute of Applied Sciences
University of North Texas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list