Change the class of an object to indicate that it should be treated ‘as is’.
- an object
I has two main uses.
- In function
data.frame. Protecting an object by enclosing it in
I()in a call to
data.frameinhibits the conversion of character vectors to factors and the dropping of names, and ensures that matrices are inserted as single columns.
Ican also be used to protect objects which are to be added to a data frame, or converted to a data frame via
formula. There it is used to inhibit the interpretation of operators such as
"^"as formula operators, so they are used as arithmetical operators. This is interpreted as a symbol by
A copy of the object with class
"AsIs" prepended to the class(es).
Chambers, J. M. (1992) Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
Documentation reproduced from R 3.0.2. License: GPL-2.