R Prophram Flashcards

1
Q

They are two types of vectors?

A

Atomic, and list

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

What is a vector?

A

A group of elements that are the same type.

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

What are the six primary vectors ?

A

Logical
Intergel
Double
Characters
Complex
Raw

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

Double and Intriguers are knows as ?

A

Numeric vectors

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

Logical and character vector are knows as?

A

Atomic

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

What is the C function in R called?

A

Combine function

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

How to create a numeric vector?

A

C(adds numbers follow by comas )

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

How to create a intriguer

A

C( number and an L separate by comma)

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

Characters vectors?

A

C( “Liz”, “anna”, “david”)

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

For logical vector ?

A

C( true, false, true)

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

Every vector has two keys properties?

A

Type and length

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

To know the type of vector?

A

Typeof()

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

Typeof function exp

A

Typeof(c( “a”,”b”,”c”))

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

How to determine the length of a vector?

A

Length()

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

How to add a variable and know the length example.

A

X< c(33.5,57,45)
Length(x)
3

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

Ana they way to know the type of vector is by ?

A

Is.function

17
Q

Example of is.

A

Is. Logical() is.double()
Add variable
X< c(2l,3l,6l)
Is. Interguer (x)
If true or false will answer

18
Q

E

A
19
Q

How to name a vector ?

A

Names()

20
Q

Example of a name function

A

X<c( 1,2,3)
Names(x)<c(“a”,”b”,”c”)

21
Q

If one wants a different element in the same structure one creates a?

A

List

22
Q

What are the data structures?

A

Vectors
Data frames
Matrices
Arrays

23
Q

How to create a list ?

A

List(x,y,z)

24
Q

How to determine the structure of a list?

A

Use the str() function
Example
Str(list(“a”,1L, 15, true)

25
Q

One can name a list when first created
Example.

A

List(‘Chicago’=1, ‘new York’=2, ‘San Francisco’=4)