inherits(object, "Date") is all that is required.
We don't need to complicate R with such simple functions.
On Mon, 26 Sep 2005, Charles Dupont wrote:
> Why is there no is.Date function in R? I am running 2.1.1 does it exist
> in newer version? If there is a reasoning behind the lack of a is.D
Try this:
> is(Sys.Date(), "Date")
[1] TRUE
> is(33, "Date")
[1] FALSE
> inherits(Sys.Date(), "Date")
[1] TRUE
> inherits(33, "Date")
[1] FALSE
> R.version.string
[1] "R version 2.2.0, 2005-09-20"
On 9/26/05, Charles Dupont <[EMAIL PROTECTED]> wrote:
> Why is there no is.Date function in R? I
Why is there no is.Date function in R? I am running 2.1.1 does it exist
in newer version? If there is a reasoning behind the lack of a is.Date
function what is it?
Thanks
Charles
--
Charles Dupont Computer System Analyst School of Medicine
Phone: (615) 936-6510 Department of