[R] Finding out the format of an object
Thomas L Jones
DrJones at alum.MIT.edu
Thu Apr 6 20:24:35 CEST 2006
Suppose I have an arbitrary R object. Is there a way to find out its
format? There are 118 points, each described by two numbers. Let the
name of the object be "obj" without the quotes. I can do a print
(obj), but all I get is a bunch of numbers. I can do a ls.str (obj),
but all I get is a bunch of numbers. Is it a data frame? A vector with
118 elements, each having two sub-elements? Or ---?
The object in question is of the class gam (Generalized Additive
Model). I know how to pull out some data with the "predict" function,
but, when I try to print the value of the predict function, all I get
is a bunch of numbers.
Also, how could I have looked this up without having to post a
question here?
Tom
Thomas L. Jones, Ph.D., Computer Science
More information about the R-help
mailing list