An R package for Chronological objects which can handle dates and times, written by David James.
Questions tagged [chron]
111 questions
0
votes
2 answers
Subsetting a column in data frame of class chron by a vector of dates
I have a dataframe like the one given by:
x <- c(1:6)
y <- c("06/01/13 16:00:00",
"06/01/13 16:00:00",
"06/03/13 20:00:00",
"06/03/13 20:00:00",
"06/07/13 20:00:00",
"06/08/13 20:00:00")
dfrm <-…

Giulia
- 279
- 1
- 4
- 14
0
votes
1 answer
Chron to POSIXct
I have a large dataset that in the first two columns contain the Date/Time information in character type.
Date Time Current
1 28.02.2013 23:58:50 NA
2 28.02.2013 23:58:50 …

Tarigarma
- 29
- 1
- 8
0
votes
2 answers
How to create a chron sequence where time records are equally distributed (consistent delta t)
I have the following functions. CreateChronVector does exactly what it implies. The resulting vector is in hourly intervals by default. The RoundHour function rounds up a chron vector to the hour.
CreateChronVector <- function(chronFrom,…

JAponte
- 1,508
- 1
- 13
- 21
-1
votes
1 answer
Test if a date is a holiday in r
I have a data set that looks like this:
9/1/2014 00:00:25
9/1/2014 00:00:28
9/1/2014 00:00:40
There are many more observations...
I want to create a column that indicates if a date is a holiday or not , so i used the is.holiday() function.…

Eliza R
- 125
- 1
- 10
-1
votes
1 answer
Converting Excel times to POSIXct in r
I'm using an Excel dataset where the time values, MM:SS, come in numeric values that I need to convert to POSIXct in r and then make calculations.
Below is sample data of what I have and I need to get
dfOrig <- data.frame(StandarTime = …

user3357059
- 1,122
- 1
- 15
- 30
-4
votes
2 answers
R: Turning a string of h:m:s to the corresponding time object
Say I have a column in my data frame containing only objects of strings:
"00:20:10"
"02:12:10"
etc
I want to just convert these strings to the corresponding time type object (in chron library) so I can do things like calculate the mean time etc.…

sammuh
- 41
- 3
- 12