R Programming Language

399 questions in the bank
Are you ready to take quiz?
Explore more
Logo
About the Quiz

Quiz will ask 20 randomly selected questions with allotted time of . You can take the quiz more than once. Once you submit the quiz, you can review how you have done, the correct the answers for each questions and the explanation for the correct the answer.

Quiz Topics

11 Modules

Basic Syntax and Data Types

5 topics
1.

Data frames and tibbles

10 questions
2.

Data types (numeric, character, logical, etc.)

10 questions
3.

Matrices and arrays

10 questions
4.

Variables and assignment

10 questions
5.

Vectors and lists

10 questions

Control Structures

3 topics

Functions

4 topics

Data Manipulation

4 topics

Data Visualization

4 topics

Statistical Analysis

4 topics

Working with Packages

3 topics

Data Import and Export

3 topics

R Markdown and Reporting

3 topics

Debugging and Testing

3 topics

Advanced Topics

4 topics
Sample questions

Which of the following is a valid way to create a variable in R?

var1 <- 10

var2 = 20

var3: 30

var4 <<- 40

What will be the output of the following code? x <- c(1, 2, 3); y <- c(4, 5, 6); z <- x + y; print(z)

c(5, 7, 9)

c(1, 2, 3)

c(4, 5, 6)

Error in addition

Which of the following data types can be stored in a list in R?

Numeric

Character

Logical

All of the above

What is the result of the following code? a <- 5; b <- 10; c <- a > b; print(c)

TRUE

FALSE

NA

Error

Which of the following correctly creates a factor variable in R?

factor_var <- factor(c('A', 'B', 'A'))

factor_var <- c('A', 'B', 'A')

factor_var <- as.factor(c(1, 2, 1))

Both A and C

Quiz Topics

11 Modules

Basic Syntax and Data Types

5 topics
1.

Data frames and tibbles

10 questions
2.

Data types (numeric, character, logical, etc.)

10 questions
3.

Matrices and arrays

10 questions
4.

Variables and assignment

10 questions
5.

Vectors and lists

10 questions

Control Structures

3 topics

Functions

4 topics

Data Manipulation

4 topics

Data Visualization

4 topics

Statistical Analysis

4 topics

Working with Packages

3 topics

Data Import and Export

3 topics

R Markdown and Reporting

3 topics

Debugging and Testing

3 topics

Advanced Topics

4 topics