Skip to content
Prev 284185 / 398502 Next

Checking for invalid dates: Code works but needs improvement

Hi David and Rui,

Sorry to be so slow in replying. Thank you both for pointing out that the problem with my code was that I was using comparison operators on mixed data types. This is something I'll have to be more careful about in the future.

In an earlier email, David talked about how R can seem uncooperative or even "unfair" when you're just starting out. I too have had this experience, but it seems less "unfair" each time I use it. This time, I was able to write inelegant but functional code to solve my problem. Last time, I wasn't able to solve a much simpler problem at all. So I guess that's a kind of progress. 

At this point, I have serviceable code for checking my dates. I can improve this when I begin to develop some real skill as an R programmer, but it will do nicely for now.

Thanks everyone for your help with this.

Paul
Message-ID: <1328364403.25481.YahooMailClassic@web161603.mail.bf1.yahoo.com>
In-Reply-To: <mailman.25.1328007607.17051.r-help@r-project.org>