Variable information Flashcards
1
Q
is.na(x), is.null(x), is.array(x), is.data.frame(x), is.numeric(x), is.complex(x), is.character(x), …
A
test for type
2
Q
length(x)
A
number of elements in x
3
Q
dim(x)
A
Retrieve or set the dimension of an object; dim(x) <- c(3,2)
4
Q
dimnames(x)
A
Retrieve or set the dimension names of an object
5
Q
nrow(x)
A
number of rows; NROW(x) is the same but treats a vector as a one-
row matrix
6
Q
ncol(x)
A
id. for columns
7
Q
class(x)
A
get or set the class of x; class(x)
8
Q
unclass(x)
A
remove the class attribute of x
9
Q
attr(x,which)
A
get or set the attribute which of x
10
Q
attributes(obj)
A
get or set the list of attributes of obj