[R] Locating data source error in large file

Rich Shepard
Fri, 20 Jul 2018 20:31:46 -0000

On Fri, 20 Jul 2018, Eric Berger wrote:

> This may not be the most efficient but it will identify the offenders.
>
>>  foo <-  paste(wy2016$date, wy2016$time))
>> uu <- sapply(1:length(foo),
>             function(i) { a <- try(as.POSIXct(foo[i]),silent=TRUE)
>             "POSIXct" %in% class(a) })
>> which(!uu)

Eric,

   Thank you. Now I know there are NAs there this should help me find them.

Regards,

Rich