Best R Language Test 3

This quiz “R Language Test” will help you to check your ability to execute some basic operations on objects in the R language, and it will also help you to understand some basic concepts. This quiz about R Language Test will help you to improve your computational understanding. Let us start with R Language Test Quiz.

Online MCQs about R Programming Language with Answers

1. _______ applies a function over the margins of an array

 
 
 
 

2. Which of the following is a base package for the R language?

 
 
 
 

3. R functionality is divided into a number of

 
 
 
 

4. _______ loop over a list and evaluate a function on each element

 
 
 
 

5. When working in R, for which part of the data analysis process do analysts use the tidyr package?

 
 
 
 

6. An analyst is checking the value of the variable x using a logical operator, so they run the following code:

x > 35 & x < 65

Which values of x would return TRUE when the analyst runs the code? Select all that apply.

 
 
 
 

7. The debug( ) flags a function for ______ mode in R mode.

 
 
 
 

8. Which of the following is an example of a vectorized operation for subtraction operation

> x<- 1:4
> y<- 6:9

 
 
 
 

9. What would be the output of the following code?
> x <- 1:4
> x > 2

 
 
 
 

10. Why would a data analyst want to use the CRAN network when working with RStudio?

 
 
 
 

11. Which of the following method make a vector of repeated values?

 
 
 
 

12. ____ ____is used to apply a function over subsets of a vector

 
 
 
 

13. The lapply( ) function takes _______ arguments

 
 
 
 
 

14. A matrix is _______ dimensional rectangular data set.

 
 
 
 

15. What would be the value of the following expression?

> log(-1)

 
 
 
 

16. The ________ function takes a vector or other objects and splits it into groups determined by a factor or list of factors.

 
 
 
 

17. What would be the output of the following code?

> x <- 1:4
> y <- 6:9
> z <- x + y
> z

 
 
 
 

18. ______ function is same as lapply( )

 
 
 
 

19. R comes with a ________ to help you optimize your code and improve its performance.

 
 
 
 

20. Which of the following is used for Statistical analysis in R language?

 
 
 
 

The R language Test covers some looping functions such asapply(), lapply(), mapply(), sapply(), and tapply(). Results from the execution of r codes are also asked.

rfaqs.com R Language Test

Online R Language Test

  • Which of the following is a base package for the R language?
  • R comes with a to help you optimize your code and improve its performance.
  • The debug( ) flags a function for mode in R mode.
  • A matrix is _________ a dimensional rectangular data set.
  • The function takes a vector or other objects and splits it into groups determined by a factor or list of factors.
  • The lapply( ) function takes arguments
  • ________is used to apply a function over subsets of a vector
  • ________ applies a function over the margins of an array
  • _________ function is the same as lapply( ) __________ loop over a list and evaluate a function on each element
  • Which of the following methods makes a vector of repeated values?
  • Which of the following is used for Statistical analysis in R language?
  • R functionality is divided into a number of
  • Which of the following is an example of a vectorized operation for subtraction operation > x<- 1:4 > y<- 6:9 What would be the output of the following code? > x <- 1:4 > y <- 6:9 > z <- x + y > z
  • What would be the output of the following code? > x <- 1:4 > x > 2
  • What would be the value of the following expression? > log(-1)
  • “An analyst is checking the value of the variable x using a logical operator, so they run the following code:x > 35 & x < 65
    Which values of x would return TRUE when the analyst runs the code? Select all that apply.”
  • When working in R, for which part of the data analysis process do analysts use the tidyr package?
  • Why would a data analyst want to use the CRAN network when working with RStudio?

R Programming Language

Computer MCQs Test Online

MCQs R Programming Language 2

This quiz “MCQs R Programming Language” will help you to check your ability to execute some basic operations on objects in the R language, and it will also help you to understand some basic concepts. This MCQs R Programming Language Quiz will also improve computational understanding. Let us start with the test “MCQs R Programming Language” with Answers.

Please go to MCQs R Programming Language 2 to view the test

rfaqs.com MCQs R Programming Language

MCQs R Programming Language 1

  • The R language is a dialect of which of the following programming languages?
  • The definition of free software consists of four freedoms (freedoms 0 through 3). Which of the following is NOT one of the freedoms that are part of the definition?
  • In R language the following are all atomic data types EXCEPT
  • If I execute the expression x <- 4 in R language, what is the class of the object “x” as determined by the “class()” function?
  • What is the class of the object defined by the expression x <- c(4, “a”, TRUE)?
  • If I have two vectors x <- c(1,3, 5) and y <- c(3, 2, 10), what is produced by the expression rbind(x, y)?
  • A key property of vectors in R language is that
  • Suppose I have a list defined as x <- list(2, “a”, “b”, TRUE). What does x[[2]] give me?
  • Suppose I have a vector x <- c(3, 5, 1, 10, 12, 6) and I want to set all elements of this vector that are less than 6 to be equal to zero. What R code achieves this?
  • ____________ is a function in R to get the number of observations in a data frame
  • What function is used to test the missing observation in a data frame
  • Which of the following statements about RStudio’s integrated development environment are correct?
  • Suppose I have a vector x <- 1:4 and y <- 2:3. What is produced by the expression x + y?
  • Which of the following statements about RStudio’s integrated development environment are correct?
  • A data analyst writes the code summary(penguins) to display a summary of the penguins dataset. Where in RStudio can the analyst execute the code?
  • What should you use to assign a value to a variable in R?
  • Which of the following examples is the proper syntax for a function in R?
  • What is the benefit of using the R programming language for data analysis?
  • Which of the following examples can you use in R for date/time data?
  • A data analyst inputs the following calculation in their R programming: $$basket_1 * 20 + basket_2 * 15 $$ Which arithmetic operators are the analyst using?
Learn R Language and FAQS

MCQs General Knowledge

MCQs in Statistics

Exploring Data in R: A Comprehensive R Tutorial

Examination of data (Exploring Data), particularly graphical examination and representation of data is an important prelude to statistical data analysis and modeling. Note that there are some limitations on the kinds of graphs that we can create.

One should be familiar with standard procedures for exploratory data analysis, statistical graphics, and data transformation. We can categorize the graphical representation of data based on the variable’s nature (or type), the number of variables, and the objectivity of the analysis. For example, if we are comparing groups then comparison graphs such as bar graphs can be used. If we are interested in the kind of relationship between variables then a scatter plot can be useful.

  • Distributional Displays:
    The distributional displays include stem and leaf displays, histograms, density estimates, quantile comparison plots, and box plots.
  • Plots of the Relationship between two variables:
    The graphical representations of the relationship between two variables include various versions of scatter plots, scatter plot smoothers, bivariate density estimates, and parallel box plots.
  • Multivariate Displays:
    Multivariate graphical representations include scatter plot matrices, coplots, and dynamic three-dimensional scatter plots.

For exploring the data in R, the following are some examples:

Stem and Leaf Display and Histogram in R

attach(mtcars)
hist(mpg)
hist(mpg, nclass = 3, col = 3)
stem(mpg)
Histogram: Exploring Data in R

Exploring Data in R: Density Estimates

Consider the following R code for a representation of distribution by smoothing the histogram.

hist(mpg, probability = T, ylab = 'Density')
lines(density(mpg, lwd = 2))
points(mpg, rep(0, length(mpg)), pch = "|")
lines(density(mpg, adjust = 0.9), lwd = 1)

The hist() function constructs the histogram with probability=TRUE specifying density scaling. The lines() function draws the density estimate on the graph having a thickness of the line as double due to the parameter lwd=2. The points() function draws a one-dimensional scatter plot at the bottom of the graph by using a vertical bar as the plotting symbol. The second call to density in lines() the function with adjust=0.9, specifies a bandwidth of 0.9 the default value.

Quantile Comparison Plots

Quantile plots help in comparing the distribution of a variable with a theoretical distribution such as the normal distribution.

library(car)
qqPlot(mpg)

Note that the qqPlot() function is available in the car library. The qq.plot() function is defunct.

Exploring Data: Relationship Graphs

To explore the relationship between two quantitative variables use plot() function and for a more enhanced version of a scatter plot between two variables use scatterplot() function. This function plots the variables with least squares and non-parametric regression lines. For example,

plot(mpg, wt)
scatterplot(mpg, wt)
scatterplot(mpg, wt, labels = rownames(cyl))

CLICK to learn about plot() function in R

FAQs about R Language

  1. What do you mean by exploring data?
  2. What are the objectives of exploratory data analysis?
  3. What are the important visualizations for exploratory data analysis?
  4. For exploratory analysis, which graph is used for comparison purposes?
  5. For exploratory analysis, which graph is used to explore the relationship between variables?
  6. What is a quantile comparison plot?
  7. What is the objective of density estimation graphs?
  8. Name some of the multivariate plots used for EDA.

R Programming Language

Computer MCQs Online Test