Enrico seems to have found the problem - you can't change dates much
by changing the time zone, but transposing month and day will do the
trick nicely. The mm/dd/yyyy format and others like it are so common
that you always have to be on the lookout for it. Is the sample data
you included in your first email taken from the file you are reading
in? When I read in that sample data the correct result was returned. I
would open the original file in a text editor, read the data in using
your commands and then:

head(dta)

and compare what appears with the original file. You may see the
problem straightaway.

Jim


On Thu, Jan 9, 2020 at 7:50 AM Enrico Schumann <e...@enricoschumann.net> wrote:
> ...
> The data that you read in has January (1) as month.
> So whatever goes wrong, seems to go wrong when you read
> the data.  Are you quite sure you read the file you
> read is the file you have shown?
>

______________________________________________
R-help@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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to