typeof

0th

Percentile

The Type of an Object

typeof determines the (R internal) type or storage mode of any object

Keywords
attribute
Usage
typeof(x)
Arguments
x

any R object.

Value

A character string. The possible values are listed in the structure TypeTable in src/main/util.c. Current values are the vector types "logical", "integer", "double", "complex", "character", "raw" and "list", "NULL", "closure" (function), "special" and "builtin" (basic functions and operators), "environment", "S4" (some S4 objects) and others that are unlikely to be seen at user level ("symbol", "pairlist", "promise", "language", "char", "...", "any", "expression", "externalptr", "bytecode" and "weakref").

See Also

mode, storage.mode.

isS4 to determine if an object has an S4 class.

Aliases
  • typeof
  • type
Examples
library(base) typeof(2) mode(2)
Documentation reproduced from package base, version 3.4.1, License: Part of R 3.4.1

Community examples

Looks like there are no examples yet.