

   TThhee ((SSttoorraaggee)) MMooddee ooff aann OObbjjeecctt

        mode(x)
        mode(x) <- "<mode>"
        storage.mode(x)
        storage.mode(x) <- "<mode>"

   DDeessccrriippttiioonn::

        `mode' and `storage.mode' provide means of determining
        the type or storage mode of an object.  Both return a
        character string giving the (storage) mode of the
        object -- often the same -- both relying on the output
        of `typeof(x)', see the example below.

        The two assignment versions are currently identical.
        Both `mode(x) <- newmode' and `storage.mode(x) <- new-
        mode' change the `mode' or `storage.mode' of object `x'
        to `newmode'.

   SSeeee AAllssoo::

        `typeof' for the R-internal ``mode'', `attributes'.

   EExxaammpplleess::

        sapply(options(),mode)

        cex3 <- c("1","1:1","1i","list(1)","args","lm",
          "formals(lm)[[2]]","y~x","(y~x)[[1]]", "expression(x <- pi)[[1]][[1]]")
        lex3 <- sapply(cex3, function(x) eval(parse(text=x)))
        mex3 <- t(sapply(lex3, function(x) c(typeof(x), storage.mode(x), mode(x))))
        dimnames(mex3) <- list(cex3, c("typeof(.)","mode(.)","storage.mode(.)"))
        mex3

        ## This also makes a local copy of  `pi':
        storage.mode(pi) <- "complex"
        storage.mode(pi)
        rm(pi)

