[Rd] is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
timh at insightful.com
timh at insightful.com
Sat Jan 5 02:05:08 CET 2008
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
More information about the R-devel
mailing list