[Rd] sapply(Date, is.numeric) (PR#12221)

From: <Robert.McGehee_at_geodecapital.com>
Date: Thu, 07 Aug 2008 12:02:15 +0200 (CEST)


FYI,=20
I've tried posting the below message twice to the bug tracking system, once by email (below), and the second time 5 days later directly to the bugs.r-project.org website. As far as I can tell, the bug tracking system hasn't picked this up. Also it looks like the latest "incoming" bug is dated 25 May 2008, so perhaps others are having difficulty as well. (cc: r-bugs)

Cheers, Robert

-----Original Message-----
From: McGehee, Robert=20
Sent: Monday, July 14, 2008 9:51 AM
To: R-bugs_at_biostat.ku.dk
Subject: sapply(Date, is.numeric)

R-developers,
The results below are inconsistent. From the documentation for is.numeric, I expect FALSE in both cases.

> x <- data.frame(dt=3DSys.Date())
> is.numeric(x$dt)
[1] FALSE
> sapply(x, is.numeric)
  dt
TRUE ## Yet, sapply seems aware of the Date class
> sapply(x, class)

  dt
"Date"

platform       i386-pc-mingw32            =20
arch           i386                       =20
os             mingw32                    =20
system         i386, mingw32              =20
status                                    =20
major          2                          =20
minor          7.0                        =20
year           2008                       =20
month          04                         =20
day            22                         =20
svn rev        45424                      =20
language       R                          =20
version.string R version 2.7.0 (2008-04-22)

Thanks,

Robert McGehee, CFA
Geode Capital Management, LLC
One Post Office Square, 28th Floor | Boston, MA | 02109 Tel: 617/392-8396 Fax:617/476-6389
mailto:robert.mcgehee_at_geodecapital.com

This e-mail, and any attachments hereto, are intended fo...{{dropped:12}}



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 07 Aug 2008 - 10:23:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Aug 2008 - 11:36:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive