[Rd] is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)

From: <timh_at_insightful.com>
Date: Sat, 5 Jan 2008 02:05:08 +0100 (CET)


is() does not catch parent S3 classes:
> library(splines)
> temp <- bs(1:99, df=5)
> class(temp)

[1] "bs" "basis"
> is(temp, "basis")

[1] FALSE In contrast, is() does catch parent S4 classes:
> library(copula)
> norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),

+                         dim = 3, dispstr = "un")

> is(norm.cop, "copula")

[1] TRUE
> class(norm.cop)

[1] "normalCopula"

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status =
 major = 2
 minor = 6.1
 year = 2007
 month = 11
 day = 26
 svn rev = 43537
 language = R
 version.string = R version 2.6.1 (2007-11-26)

Windows XP (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:splines, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 05 Jan 2008 - 01:06:42 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 Mon 07 Jan 2008 - 20:30:07 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