Vectors, Arrays, and Matrices in R

Vectors, Arrays, and Matrices in R

Assessment

Flashcard

•

Mathematics

•

University

•

Practice Problem

•

Hard

Created by

Dr.J.Hirudhaya Asha

FREE Resource

Student preview

quiz-placeholder

105 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What are the different R variable types?

Back

Integer, numeric (floating-point number), character (string), logical (Boolean), complex.

2.

FLASHCARD QUESTION

Front

How are vectors stored in R?

Back

Vectors are stored like arrays in C, contiguously.

3.

FLASHCARD QUESTION

Front

Can you insert or delete elements in a vector in R?

Back

No, the size of a vector is determined at its creation.

4.

FLASHCARD QUESTION

Front

How do you add an element to the middle of a vector in R?

Back

Use the c() function to combine parts of the vector with the new element.

5.

FLASHCARD QUESTION

Front

What function is used to obtain the length of a vector in R?

Back

The length() function.

6.

FLASHCARD QUESTION

Front

What is the result of the expression length(c(1,2,4))?

Back

3.

7.

FLASHCARD QUESTION

Front

What does the function first1 do?

Back

It returns the index of the first occurrence of the value 1 in a vector.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?