[R] Locating data source error in large file

William Dunlap wdun|@p @end|ng |rom t|bco@com
Fri Jul 20 21:59:40 CEST 2018

Which format did you use when you used is.na on the output of
   as.POSIXlt(strings, format=someFormat)
and found none?  Did the resulting dates look OK?  Perhaps
all is well.

Note the the common American format month/day/year is not
one that is tested when you don't supply a format - xx/yy/zzzz
is treated as year/month/day (and it changes the time zone,
presumable because US/Pacific time was not used in the year
10 CE).
  > as.POSIXlt("10/7/1962")
  [1] "0010-07-19 LMT"
  > as.POSIXlt("3/17/1962")
  Error in as.POSIXlt.character("3/17/1962") :
    character string is not in a standard unambiguous format

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, Jul 20, 2018 at 11:58 AM, Rich Shepard <rshepard using appl-ecosys.com>

> On Fri, 20 Jul 2018, William Dunlap wrote:
> The problem occurs because no commonly used format works on all your date
>> strings. If you give as.POSIXlt the format you want to use then items that
>> don't match the format will be treated as NA's. Use is.na() to find them.
> Bill,
>   No NAs found using both is.na() and scrolling through the source file.
> That's why I asked for help: I saw nothing different in the dates or times.
> Regards,
> Rich
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]

More information about the R-help mailing list