Hi all

I want to use function of is.list and is.data.frame in if-else statement,
but I get a trouble. To replicate this trouble, I run codes like that:

> set.seed(123)
> x <- rnorm(100)
> x <- data.frame(matrix(x, 10, 10))
> class(x)
[1] "data.frame"
> is.list(x)
[1] TRUE
> is.data.frame(x)
[1] TRUE

> version
               _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          13.1
year           2011
month          07
day            08
svn rev        56322
language       R
version.string R version 2.13.1 (2011-07-08)


The class of x is data frame, but when I use is.list, I also get a TRUE
result. Why does this happen?

Lian Peng

	[[alternative HTML version deleted]]

