Re: [R] Reporting missing dates

2020-01-17 Thread Jim Lemon
Hi Jeff, As I'm sure you realize, that only tells you whether a date is within the range that you have specified. Do you only want to find dates within a certain range: new_date<-as.Date("2020-01-10") new_date < min(d) | new_date > max(d) or maybe whether the text string specifying the date is

Re: [R] Reporting missing dates

2020-01-16 Thread David Winsemius
Looks reasonable and efficient. There is a seq.Date function that would be implicitly selected by the S3 class dispatch rules David Sent from my iPhone > On Jan 16, 2020, at 4:28 AM, Jeff Reichman wrote: > > R-help Forum > > I have a 20 year data set and I am looking for a way to find miss

Re: [R] Reporting missing dates

2020-01-16 Thread Enrico Schumann
Quoting Duncan Murdoch : On 15/01/2020 4:28 p.m., Jeff Reichman wrote: R-help Forum I have a 20 year data set and I am looking for a way to find missing dates. I wrote this and its works, but am wounding if there is a better way? d <- c('2020-01-01', '2020-01-02', '2020-01-04', '2020-01-05'

Re: [R] Reporting missing dates

2020-01-16 Thread Duncan Murdoch
On 15/01/2020 4:28 p.m., Jeff Reichman wrote: R-help Forum I have a 20 year data set and I am looking for a way to find missing dates. I wrote this and its works, but am wounding if there is a better way? d <- c('2020-01-01', '2020-01-02', '2020-01-04', '2020-01-05') d <- as.Date(d) date_range

Re: [R] Reporting missing dates

2020-01-16 Thread PIKAL Petr
dnesday, January 15, 2020 10:28 PM > To: R-help@r-project.org > Subject: [R] Reporting missing dates > > R-help Forum > > I have a 20 year data set and I am looking for a way to find missing dates. > I wrote this and its works, but am wounding if there is a better way? > >

[R] Reporting missing dates

2020-01-15 Thread Jeff Reichman
R-help Forum I have a 20 year data set and I am looking for a way to find missing dates. I wrote this and its works, but am wounding if there is a better way? d <- c('2020-01-01', '2020-01-02', '2020-01-04', '2020-01-05') d <- as.Date(d) date_range <- seq(min(d), max(d), by = 1) date_range[!date