The Type of an Object (original) (raw)

typeof {base} R Documentation

Description

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

Usage

typeof(x)

Arguments

Value

A character string. The possible values are listed in the structureTypeTable 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","object","language", "char", "...", "any","expression", "externalptr", "bytecode" and"weakref").

See Also

[mode](../../base/help/mode.html), [storage.mode](../../base/help/storage.mode.html).

[isS4](../../base/help/isS4.html) to determine if an object has an S4 class.

Examples

typeof(2)
mode(2)
## for a table of examples, see  ?mode  /  examples(mode)

[Package _base_ version 4.6.0 Index]