| logical vector |
logical |
logical |
logical |
logical |
| integer vector |
integer |
numeric |
integer |
integer |
| numeric vector |
numeric |
numeric |
double |
double |
| complex vector |
complex |
complex |
complex |
complex |
| character vector |
character |
character |
character |
character |
| raw vector |
raw |
raw |
raw |
raw |
| factor |
factor |
numeric |
integer |
integer |
| logical matrix |
matrix |
logical |
logical |
logical |
| numeric matrix |
matrix |
numeric |
double |
double |
| logical array |
array |
logical |
logical |
logical |
| numeric array |
array |
numeric |
double |
double |
| list |
list |
list |
list |
list |
| pairlist |
pairlist |
pairlist |
pairlist |
pairlist |
| data frame |
data.frame |
list |
list |
list |
| closure function |
function |
function |
closure |
function |
| primitive function |
function |
function |
builtin |
function |
| special function |
function |
function |
special |
function |
| environment |
environment |
environment |
environment |
environment |
| null |
NULL |
NULL |
NULL |
NULL |
| formula |
formula |
call |
language |
language |
| expression |
expression |
expression |
expression |
expression |
| call |
call |
call |
language |
language |
| name |
name |
name |
symbol |
symbol |
| paren in expression |
( |
( |
language |
language |
| brace in expression |
{ |
call |
language |
language |
| S3 lm object |
lm |
list |
list |
list |
| S4 dummy object |
dummy |
S4 |
S4 |
S4 |
| external pointer |
externalptr |
externalptr |
externalptr |
externalptr |
################
### examples ###
################
x <- 1 ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "numeric" "numeric" "double" "double"
x <- letters ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "character" "character" "character" "character"
x <- TRUE ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "logical" "logical" "logical" "logical"
x <- cars ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "data.frame" "list" "list" "list"
x <- cars[1] ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "data.frame" "list" "list" "list"
x <- cars[[1]] ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "numeric" "numeric" "double" "double"
x <- matrix(cars) ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "matrix" "list" "list" "list"
x <- new.env() ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "environment" "environment" "environment" "environment"
x <- expression(1+1) ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "expression" "expression" "expression" "expression"
x <- ls ; c(class(x), mode(x), storage.mode(x), typeof(x))
## [1] "function" "function" "function" "closure"