mode(x) mode(x) <- valuestorage.mode(x) storage.mode(x) <- value
storage.mode returns one of "integer", "double" or "single" if x is numeric; it returns the mode of x otherwise.
storage.mode is relevant only when calling .Fortran or .C with numeric data. When mode(x) is "numeric", the data of x may be stored as integers, or as single-precision or double-precision floating point numbers: storage.mode(x) will be "integer", "single" or "double" correspondingly.
The atomic modes are: "logical", "numeric", "complex", "character" and "null". The other modes are: "list", "function", "graphics", "expression", "comment.expression", "name", "call", "call(...)", "frame", "<-", "<<-", "missing", "internal", "repeat", "while", "for", "{", "return", "break", "next", "if", "unknown".
mode(x) # get the mode of x mode(x) <- "complex" # change mode to complexstorage.mode(x) <- "single"