MCQs R Basics Quiz 26

The post is about the “MCQs R Basics Quiz” which will help you check your ability to execute some basic or R Language, RStudio, Jupyter Notebook, and Google Colab. This quiz will help the learner to understand some basic concepts related to R Programming Language. This quiz may also improve your computational understanding, and it will also help you to learn and practice the MCQs R Basics Quiz now.

Online MCQs R Basics Quiz with Answers

Online MCQs R Basics Quiz Questions with Answers

1. What does the class() function do in R?

 
 
 
 

2. Why is it helpful to be able to use functions like rnorm, rpois, rbinom, and runif?

 
 
 
 

3. What happens if you run this code? data.frame(alpha,beta)

 
 
 
 

4. What will happen if you try to run this line of code in R? 10variable1 <- c(5,19,10,"apple")

 
 
 
 

5. Is it easier to import rectangular or non-rectangular data into R?

 
 

6. Which of these is the easiest way to save R code that you write for future use?

 
 
 
 

7. Are cheat sheets trustworthy guides for how to use R and RStudio?

 
 
 

8. What is the easiest way to export a figure you create in RStudio?

 
 
 

9. What value will this return?

subtract_and_divide <- function(x, y){
x - y
x / y
}
subtract_and_divide(4, 8)

 
 
 
 

10. Which of the following most accurately describes R?

 
 
 
 

11. What does this line of code do in R? a <- 2+2

 
 
 
 

12. Will R return a value of true or false if you evaluate this expression? "apple"=="appla"

 
 
 
 

13. After you finish the trial period, R will cost hundreds of dollars to use, depending on the license you purchase.

 
 
 

14. How many working directories can you have set simultaneously in an R session?

 
 
 
 

15. In R, create the following object: test_vector <- c("dog","fish","pig","parrot").
After you create the object, what do you get if you then run test_vector[4]?

 
 
 
 

16. What part of the data frame “states” does this code call? states[15,2]

 
 
 

17. Which of the following correctly describes the relationship between RStudio and R?

 
 
 
 

18. You want to access the “Date” column of a data frame called sales_data so you can operate on it. What is the correct way to refer to this column?

 
 
 
 

19. You need to carefully learn and understand all the details about how R works before you start coding.

 
 
 

20. Say you have a data frame named “inventory” with 3 rows and two columns, created like this:
home <- c("computer", "calculator", "scanner")
office <- c("paper", "pens", "pencils")
inventory <- data.frame(home, office)
What would happen if you ran this code?
inventory$annex <- c("printer", "stapler")

 
 
 

Online MCQs R Basics Quiz with Answers

  • Which of the following most accurately describes R?
  • Which of the following correctly describes the relationship between RStudio and R?
  • Which of these is the easiest way to save R code that you write for future use?
  • After you finish the trial period, R will cost hundreds of dollars to use, depending on the license you purchase.
  • You need to carefully learn and understand all the details about how R works before you start coding.
  • Are cheat sheets trustworthy guides for how to use R and RStudio?
  • What does this line of code do in R? a <- 2+2
  • Will R return a value of true or false if you evaluate this expression? “apple”==”appla”
  • What will happen if you try to run this line of code in R? 10variable1 <- c(5, 19, 10, “apple”)
  • In R, create the following object: test_vector <- c(“dog”, “fish”, “pig”, “parrot”). After you create the object, what do you get if you then run test_vector[4]?
  • What value will this return?
    subtract_and_divide <- function(x, y){
    x – y
    x / y
    }
    subtract_and_divide(4, 8)
  • What happens if you run this code? data.frame(alpha,beta)
  • What part of the data frame “states” does this code call? states[15,2]
  • Say you have a data frame named “inventory” with 3 rows and two columns, created like this:
    home <- c(“computer”, “calculator”, “scanner”)
    office <- c(“paper”, “pens”, “pencils”)
    inventory <- data.frame(home, office)
    What would happen if you ran this code? inventory$annex <- c(“printer”, “stapler”)
  • How many working directories can you have set simultaneously in an R session?
  • Is it easier to import rectangular or non-rectangular data into R?
  • You want to access the “Date” column of a data frame called sales_data so you can operate on it. What is the correct way to refer to this column?
  • What does the class() function do in R?
  • Why is it helpful to be able to use functions like rnorm, rpois, rbinom, and runif?
  • What is the easiest way to export a figure you create in RStudio?

MCQs Deep Learning Quiz

Leave a Reply

Discover more from R Language Frequently Asked Questions

Subscribe now to keep reading and get access to the full archive.

Continue reading