
Unit 2- R programming MCQs Quiz
Quiz
•
Mathematics
•
University
•
Hard
Dr.J.Hirudhaya Asha
Used 2+ times
FREE Resource
Enhance your content
148 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a scalar and a vector in R?
A vector is a single-number variable, while a scalar is a variable that holds multiple numbers.
A scalar and a vector are the same thing in R.
A scalar is a single-number variable, whereas a vector is considered a different variable type that can hold multiple elements.
R doesn't have a concept of scalars, only vectors.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the R variable types called?
Classes
Modes
Types
Forms
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid mode for an R vector?
Integer
Character
Logical
Object
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How are vectors stored in R, similar to arrays in C?
Randomly
Contiguously
In a linked list
In a hash table
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when you try to insert or delete elements from a vector after it's been created?
R automatically resizes the vector.
It's not possible, as the size is determined at creation.
You can, but it requires a special function.
R throws an error.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If x <- c(88, 5, 12, 13), what is the result of x <- c(x[1:3], 168, x[4])?
c(88, 5, 12, 13, 168)
c(168, 88, 5, 12, 13)
c(88, 5, 12, 168, 13)
c(88, 5, 168, 12, 13)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to obtain the length of a vector?
size()
len()
length()
dim()
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade