R Programming Quiz 19

The Quiz is about R Programming Quiz with Answers. There are 20 multiple-choice questions covering different topics related to R Language Programming. Let us start with the R Programming Quiz now.

Online R Programming Quiz with Answers

Please enter your email:

1. In R, what is the result of the function as.integer(3.3)?

 
 
 
 

2. In R, assume a character vector called “names” has the following contents:

“Harry” “Jimmy” “Tammy”

Which command would return the following logical vector?

FALSE TRUE FALSE

 
 
 
 

3. What is the first step you must take before you can read an Excel spreadsheet in R?

 
 
 
 

4. In R, variables are typically assigned using <-, but they can also be assigned using which of the following symbols?

 
 
 
 

5. What is the main reason for using the R language?

 
 
 
 

6. In R, which command removes a variable from memory?

 
 
 
 

7. After installing and calling the httr library in R, which method should you use to update a resource?

 
 
 
 

8. For a matrix $X$ of order $n\times p$ and a vector $Y$ of order $n\times 1$, one can find regression coefficients using

 
 
 
 

9. In R, what is the result of the function as.numeric(TRUE)?

 
 
 
 

10. Assume that the function add is defined as follows:

add <- function(x,y) {
(x + y)
return (x - y)
temp <<- (x * y)
return (x / y)
}

What will be the output if you issue the command add(10,5)?

 
 
 
 

11. In R, assume you have a vector named “age,” and each element in the vector is the age of one person in a group. Which command must you use to reorder the ages from youngest to oldest?

 
 
 
 

12. In R, assume you have a vector named “age,” and each element in the vector is the age of one person in a group. The vector has the following content: 24 32 46 19. What will be the result if you issue the age[-2] command?

 
 
 
 

13. In R language, which command returns the last six elements of a data object such as a data frame?

 
 
 
 

14. Assume the array books_array contains 6 elements. The array has three rows and two columns and appears as follows:

     [,1]              [,2]
[1,] "It"              "Dr. Sleep"
[2,] "Misery"          "Carrie"
[3,] "The Shining"     "The Mist"

Which of the following commands will return “The Shining”?

 
 
 
 

15. All columns in a matrix must have the

 
 
 
 

16. Which command in R would return the following character vector? “Imdad” “Usman” “Ali” “Amir”

 
 
 
 

17. How many elements will be in vector $b$, if b <- 10:15

 
 
 
 

18. In R, which command will output the data from the Nile built-in data set?

 
 
 
 

19. To perform a one-way Analysis of variance, one can use a function

 
 
 
 

20. In R, which command should you use to insert a new row into a data frame?

 
 
 
 

Online R Programming Quiz with Answers

  • What is the main reason for using the R language?
  • In R, what is the result of the function as.numeric(TRUE)?
  • In R, variables are typically assigned using <-, but they can also be assigned using which of the following symbols?
  • Which command in R would return the following character vector? “Imdad” “Usman” “Ali” “Amir”
  • In R, assume you have a vector named “age,” and each element in the vector is the age of one person in a group. The vector has the following content: 24 32 46 19. What will be the result if you issue the age[-2] command?
  • Assume the array books_array contains 6 elements. The array has three rows and two columns and appears as follows:

    [,1]              [,2]
[1,] “It”              “Dr. Sleep”
[2,] “Misery”          “Carrie”
[3,] “The Shining”   “The Mist”

Which of the following commands will return “The Shining”?

  • In R language, which command returns the last six elements of a data object such as a data frame?
  • Assume that the function add is defined as follows:
    add <- function(x,y) {
    (x + y)
    return (x – y)
    temp <<- (x * y)
    return (x / y)
    }
    What will be the output if you issue the command add(10,5)?
  • What is the first step you must take before you can read an Excel spreadsheet in R?
  • After installing and calling the httr library in R, which method should you use to update a resource?
  • In R, what is the result of the function as.integer(3.3)?
  • In R, which command removes a variable from memory?
  • In R, assume a character vector called “names” has the following contents: “Harry” “Jimmy” “Tammy” Which command would return the following logical vector? FALSE TRUE FALSE
  • In R, assume you have a vector named “age,” and each element in the vector is the age of one person in a group. Which command must you use to reorder the ages from youngest to oldest?
  • In R, which command will output the data from the Nile built-in data set?
  • In R, which command should you use to insert a new row into a data frame?
  • To perform a one-way Analysis of variance, one can use a function
  • How many elements will be in vector $b$, if b <- 10:15
  • All columns in a matrix must have the
  • For a matrix $X$ of order $n\times p$ and a vector $Y$ of order $n\times 1$, one can find regression coefficients using
R Programming Quiz with Answrs

Statistics and Data Analysis

Online Quiz and Test Website

R Programming Quiz Questions and Answers 18

This post is about “R Programming Quiz Questions and Answers”. There are 20 multiple-choice type questions from R programming covering topics related to the output of different R commands, R console, matrices, data frames, factors, vectors, R objects, and different operations on R objects. Let us start with R Programming Quiz Questions and Answers.

Please go to R Programming Quiz Questions and Answers 18 to view the test

R FAQS R Programming Quiz Questions and Answers

R Programming Quiz Questions and Answers

  • The output of seq(10, 1, -2) is
  • What will be the output of the following lines of code? x <- 31 if (x %% 2 == 0){ print(“X is even”) }else { print(“X is odd”) }
  • What would be the output of 1:5 + 5:1.
  • What will be the output of the following x <- vector(“numeric”, length = 10); print(x)
  • What would be the output of the following code? x <- 1:4 y <- 6:9 z <- x + y print(z)
  • What will be the output of the following X <- factor(c(“yes”, “yes”, “yes”, “no”, “yes”, “no”, “no”) table(X)
  • The output of the seq(1, 10, 2) is
  • What will be the output of the following code X <- factor(c(“m”, “m”, “m”, “f”, “m”, “f”, “f”) table(X)
  • What is the output of 1:4 + 4:1
  • R console is a tool that is used to write (insert) standard
  • The following command will find the 60th percentile for the variable $disp$
  • The multiplication of two matrices $A$ and $B$ can be performed in R using the operator
  • Which command will create a matrix of the first 9 numbers in 3 rows and 3 columns?
  • When we compare two vectors element by element the resultant outcome is a
  • Which of the following function can be used to create a vector having repeated values
  • The Vectors, data frames, or matrices containing decimal values can be converted to integers using
  • What is the data type of vector $a$ if a <- c(1, “m”, FALSE)
  • All columns in a matrix must have the
  • To perform one-way Analysis of variance, one can use function
  • In R, object name cannot start with
R Programming Quiz Questions and Answers

https://itfeature.com, https://gmstat.com

Best MCQs Graph Plotting in R 17

The post is about MCQs Graph Plotting in R Language. There are 20 multiple-choice questions. The quiz covers the topics related to graphics devices in R Language, base and lattice graphics systems in R, the ggplot2 function, and parameters of different plot functions. Let us start with MCQs Graph Plotting in R Language.

Please go to Best MCQs Graph Plotting in R 17 to view the test

MCQs Graph Plotting in R

  • Which of the following is an example of a valid graphics device in R?
  • Which of the following is the example of a vector graphics device in R?
  • Bitmapped file formats can be most useful for
  • Which of the following functions is typically used to add elements to a plot in the base graphics system?
  • Which function opens the screen graphics device on Windows?
  • What does the ‘pch’ option to par() control?
  • If I want to save a plot to a PDF file, which of the following is the correct way of doing that
  • Which function opens the screen graphics device for the Mac?
  • What does the gg in ggplot2 stand for?
  • Under the lattice graphics system, what do the primary plotting functions like xyplot() and bwplot() return?
  • Which of the following is a basic workhorse function of ggplot2?
  • Which types of the plot does qplot plot?
  • Transparency is determined by which parameter of the rgb function?
  • Which of the following is an R package that provides color palettes for sequential, categorical, and diverging data?
  • The following code does NOT result in a plot appearing on the screen device.
    library(lattice)
    library(datasets)
    data(airquality)
    p <- xyplot(Ozone ~ Wind | factor(Month), data = airquality)
    Which of the following is an explanation for why no plot appears?
  • In the lattice system, which of the following functions can be used to finely control the appearance of all lattice plots?
  • What is ggplot2 an implementation of?
  • What is a geom in the ggplot2 system?
  • When I run the following code I get an error: I was expecting a scatterplot of ‘votes’ and ‘rating’ to appear. What’s the problem?
  • The following code creates a scatterplot of ‘votes’ and ‘rating’ from the movies dataset in the ggplot2 package. After loading the ggplot2 package with the library() function, I can run qplot(votes, rating, data = movies)
    How can I modify the code above to add a smoother to the scatterplot?
Learn R Language and FAQS, MCQs Graph plotting in R

https://itfeature.com, https://gmstat.com