R Programming

R Arrays MCQ

1. What is an array in R? a) A data structure for storing tabular data b) A 1-dimensional list of elements c) A multi-dimensional data structure d) A collection of key-value pairs Click to View Answer and Explanation Answer: c) A multi-dimensional data structure Explanation: An array in R is a multi-dimensional data structure that

R Arrays MCQ Read More »

R Lists MCQ

1. What is a list in R? a) A sequence of numbers b) A collection of elements of the same type c) A collection of elements of potentially different types d) A key-value pair Click to View Answer and Explanation Answer: c) A collection of elements of potentially different types Explanation: A list in R

R Lists MCQ Read More »

R Vectors MCQ

1. What is a vector in R? a) A list of numbers b) A 1-dimensional array c) A type of function d) A data frame column Click to View Answer and Explanation Answer: b) A 1-dimensional array Explanation: In R, a vector is essentially a 1-dimensional array that can hold numeric, character, or logical data.

R Vectors MCQ Read More »

R Loops MCQ

1. Which loop structure in R is typically used when the number of iterations is known beforehand? a) while loop b) for loop c) repeat loop d) until loop Click to View Answer and Explanation Answer: b) for loop Explanation: The for loop in R is commonly used when the number of iterations is known

R Loops MCQ Read More »

R Operators MCQ

1. What does the '==' operator do in R? a) Assignment b) Multiplication c) Equality test d) Increment Click to View Answer and Explanation Answer: c) Equality test Explanation: The '==' operator in R is used for testing equality between two values or expressions. 2. Which operator is used for matrix multiplication in R? a)

R Operators MCQ Read More »

Scroll to Top