What I would like to do is to look at several days and determine activities that happened at times on those days. I don't really care which days, I just care about what time.
Thank you! On Tue, Aug 12, 2014 at 3:14 PM, William Dunlap <wdun...@tibco.com> wrote: > > What if I just want the seconds vector without the date, please? Is > there > > a convenient way to create such a vector, please? > > Why do you want such a thing? E.g., do you want it to print the time > of day without the date? Or are you trying to avoid numeric problems > when you do regressions with the seconds-since-1970 numbers around > 1414918800? Or is there another problem you want solved? > > Note that the number of seconds in a day depends on the day and the > time zone. In US/Pacific time I get: > > > length(seq(from=as.POSIXct("2014-08-12 > 00:00:00"),to=as.POSIXct("2014-08-12 23:59:59"), by="secs")) > [1] 86400 > > length(seq(from=as.POSIXct("2014-03-09 > 00:00:00"),to=as.POSIXct("2014-03-09 23:59:59"), by="secs")) > [1] 82800 > > length(seq(from=as.POSIXct("2014-11-02 > 00:00:00"),to=as.POSIXct("2014-11-02 23:59:59"), by="secs")) > [1] 90000 > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > > On Tue, Aug 12, 2014 at 11:51 AM, Erin Hodgess <erinm.hodg...@gmail.com> > wrote: > > Hello! > > > > If I would like to generate a sequence of seconds for a date, I would do > > the following: > > > > x <- seq(from=as.POSIXct(2014-08-12 00:00:00),to=as.POSIXct(2014-08-12 > > 23:59:59),by="secs") > > > > What if I just want the seconds vector without the date, please? Is > there > > a convenient way to create such a vector, please? > > > > thanks, > > Erin > > > > > > -- > > Erin Hodgess > > Associate Professor > > Department of Mathematical and Statistics > > University of Houston - Downtown > > mailto: erinm.hodg...@gmail.com > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > 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. > -- Erin Hodgess Associate Professor Department of Mathematical and Statistics University of Houston - Downtown mailto: erinm.hodg...@gmail.com [[alternative HTML version deleted]] ______________________________________________ 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.