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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

length(x)

A

number of elements in x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

dim(x)

A

Retrieve or set the dimension of an object; dim(x) <- c(3,2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

dimnames(x)

A

Retrieve or set the dimension names of an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

nrow(x)

A

number of rows; NROW(x) is the same but treats a vector as a one-
row matrix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ncol(x)

A

id. for columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

class(x)

A

get or set the class of x; class(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

unclass(x)

A

remove the class attribute of x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

attr(x,which)

A

get or set the attribute which of x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

attributes(obj)

A

get or set the list of attributes of obj

How well did you know this?
1
Not at all
2
3
4
5
Perfectly