
Unit 2- R programming MCQs Quiz
Authored by Dr.J.Hirudhaya Asha
Mathematics
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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()
Access all questions and much more by creating a free account
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
Already have an account?