[R] how to check a R object's property

Weiwei Shi helprhelp at gmail.com
Tue Nov 14 21:07:04 CET 2006


Hi,
I am writing a generic function and need to check if an arg is a data
frame or not. I could use
is.null(dim(x)) to get what i want. But i want to know if there is a
function which can tell me whether it is a list, a numeric vector, a
data frame, a factor and so on. Can R do that?

thanks.

-- 
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.

"Did you always know?"
"No, I did not. But I believed..."
---Matrix III



More information about the R-help mailing list