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
Hi Marc,
That the code I wrote initially is over engineered is certainly possible. Of
course, Rui's solution is a reworking of that code. If starting from scratch,
Rui likely would have done something quite different. I focused on Rui's code
because it was complete and was a clear improvement
Hi Rui, Marc, and Gabor,
Thanks for your replies to my question. All were helpful and it was interesting
to see how different people approach various aspects of the same problem.
Spent some time this weekend looking at Rui's solution, which is certainly much
clearer than my own. Managed to
On Jan 30, 2012, at 8:44 AM, Paul Miller wrote:
Hi Rui, Marc, and Gabor,
Thanks for your replies to my question. All were helpful and it was
interesting to see how different people approach various aspects of
the same problem.
Spent some time this weekend looking at Rui's solution,
On Jan 30, 2012, at 12:15 PM, David Winsemius wrote:
On Jan 30, 2012, at 8:44 AM, Paul Miller wrote:
Hi Rui, Marc, and Gabor,
Thanks for your replies to my question. All were helpful and it was
interesting to see how different people approach various aspects of the same
problem.
On Jan 30, 2012, at 1:30 PM, Marc Schwartz wrote:
On Jan 30, 2012, at 12:15 PM, David Winsemius wrote:
On Jan 30, 2012, at 8:44 AM, Paul Miller wrote:
Hi Rui, Marc, and Gabor,
Thanks for your replies to my question. All were helpful and it was
interesting to see how different
Hello,
I'm glad it helped.
Error in if (any(is.na(x) M != un Y != un)) cat(Warning: Invalid
date values in, :
missing value where TRUE/FALSE needed
Why is this happening? If the code correctly correctly handles the date
06/20/1840 without producing an error,
why can't it do
To: r-help@r-project.org
Subject: Re: [R] Checking for invalid dates: Code works but needs
improvement
Message-ID: 1327427697928-4324533.p...@n4.nabble.com
Content-Type: text/plain; charset=us-ascii
Hello,
Point 3 is very simple, instead of 'print' use 'cat'.
Unlike 'print' it allows
-write
my code as I improve.
Appreciate your help.
Paul
Message: 66
Date: Tue, 24 Jan 2012 09:54:57 -0800 (PST)
From: Rui Barradas ruipbarra...@sapo.pt
To: r-help@r-project.org
Subject: Re: [R] Checking for invalid dates: Code works but needs
improvement
Message-ID: 1327427697928
On Tue, Jan 24, 2012 at 11:54 AM, Paul Miller pjmiller...@yahoo.com wrote:
Hello Everyone,
Still new to R. Wrote some code that finds and prints invalid dates (see
below). This code works but I suspect it's not very good. If someone could
show me a better way, I'd greatly appreciate it.
Hello, again.
I now have a more complete answer to your points.
1. It's too long. My understanding is that skilled programmers can usually
or often complete tasks like this in a few lines.
It's not very shorter but it's more readable. (The programmer is always
suspect)
2. It's not
Hello Everyone,
Still new to R. Wrote some code that finds and prints invalid dates (see
below). This code works but I suspect it's not very good. If someone could show
me a better way, I'd greatly appreciate it.
Here is some information about what I'm trying to accomplish. My sense is that
Hello,
Point 3 is very simple, instead of 'print' use 'cat'.
Unlike 'print' it allows for several arguments and (very) simple formating.
{ cat(Error: Invalid date values in, DateNames[[i]], \n,
TestDates[DateNames][[i]][TestDates$Invalid==1], \n) }
Rui Barradas
--
View this
13 matches
Mail list logo