R Language Quiz 15: Important MCQs

The post is about R Language Quiz with Answers. The quiz covers, MCQs about Data Structure, Data Analysis in R, and Some Basics of R Programming Languages. Let us start with the R Programming MCQs Quiz.

Multiple Choice Questions about R Language with Answers

1. R files have an extension ———-.

 
 
 
 

2. How many atomic vector types does R have

 
 
 
 

3. What function is used to test objects if they are NaN?

 
 
 
 

4. What is the class of the object $y$

y <- c(FALSE, 2)

 
 
 
 

5. Which of the following can be used to display the names of (most of) the objects that are currently stored within R?

 
 
 
 

6. Which of them is not a basic datatype in R?

 
 
 
 

7. What is the meaning of “<-” in R

 
 
 
 

8. Which of the following is not an R object?

 
 
 
 

9. What is the output of the following

d <- diag(5, nrow = 2, ncol = 2); d

 
 
 
 

10. Matrices can be created by row-binding using the function

 
 
 
 

11. The dimension attribute is itself an integer vector having length ——-.

 
 
 
 

12. What is NaN called?

 
 
 
 

13. what is the class of object $y$

y <- c(2, "t")

 
 
 
 

14. Dataframes can be converted into a matrix by calling the following function data ———-

 
 
 
 

15. How one can create an integer say 5?

 
 
 
 

16. R language has a superficial similarity with ———.

 
 
 
 

17. What is the function to give names to columns for a matrix?

 
 
 
 

18. what is the output of the following

y <- c(TRUE, 2)

 
 
 
 

19. Which of the following is an alternative to ‘?’ symbol ———.

 
 
 
 

20. A ——– is a variable that holds one value at a time

 
 
 
 

R Language Quiz with Answers

  • What is NaN called?
  • what is the output of the following y <- c(TRUE, 2)
  • what is the class of object $y$ y <- c(2, “t”)
  • What is the class of the object $y$ y <- c(FALSE, 2)
  • Which of them is not a basic datatype in R?
  • How one can create an integer say 5?
  • The dimension attribute is itself an integer vector having length ——-.
  • Matrices can be created by row-binding using the function
  • What function is used to test objects if they are NaN?
  • What is the function to give names to columns for a matrix?
  • How many atomic vector types does R have
  • What is the output of the following d <- diag(5, nrow = 2, ncol = 2); d
  • Which of the following can be used to display the names of (most of) the objects that are currently stored within R?
  • A ——– is a variable that holds one value at a time
  • What is the meaning of “<-” in R
  • Which of the following is not an R object?
  • Dataframes can be converted into a matrix by calling the following function data ———-
  • R files have an extension ———-.
  • R language has a superficial similarity with ———.
  • Which of the following is an alternative to ‘?’ symbol ———.
R Language Quiz with Answers

https://itfeature.com

https://gmstat.com

Best Statistical Inference Quiz in R 14

The article contains a Statistical Inference quiz in R language with Answers. There are 16 questions in the “Statistical Inference Quiz in R Language”. The MCQs are from probability and regression models. Let us Start with the Statistical Inference Quiz in R.

Please go to Best Statistical Inference Quiz in R 14 to view the test

Statistical Inference Quiz in R Language

Statistical Inference Quiz in R with Answers

  • Consider the following PMF shown below in R
    x <- 1:4 p <- x/sum(x)
    temp <- rbind(x, p)
    rownames(temp) <- c(“X”, “Prob”)
    temp
    What is the mean?
  • Suppose that diastolic blood pressures (DBPs) for men aged 35-44 are normally distributed with a mean of 80 (mm Hg) and a standard deviation of 10. About what is the probability that a random 35-44-year-old has a DBP less than 70?
  • Brain volume for adult women is normally distributed with a mean of about 1,100 cc for women with a standard deviation of 75 cc. What brain volume represents the 95th percentile?
  • You flip a fair coin 5 times, about what’s the probability of getting 4 or 5 heads?
  • The respiratory disturbance index (RDI), a measure of sleep disturbance, for a specific population has a mean of 15 (sleep events per hour) and a standard deviation of 10. They are not normally distributed. Give your best estimate of the probability that a sample average RDI of 100 people is between 14 and 16 events per hour.
  • Consider a standard uniform density. The mean for this density is 0.5 and the variance is 1 / 12. You sample 1,000 observations from this distribution and take the sample mean, what value would you expect it to be near?
  • The number of people showing up at a bus stop is assumed to be Poisson with a mean of 5 people per hour. You watch the bus stop for 3 hours. About what’s the probability of viewing 10 or fewer people?
  • Consider the mtcars data set. Fit a model with mpg as the outcome that includes a number of cylinders as a factor variable and weight as a confounder. Give the adjusted estimate for the expected change in mpg comparing 8 cylinders to 4.
  • Consider the mtcars data set. Fit a model with mpg as the outcome that includes the number of cylinders as a factor variable and weight included in the model as
    lm(mpg ~ I(wt * 0.5) + factor(cyl), data = mtcars)
    How is the wt coefficient interpreted?
  • Consider the following data set
    x <- c(0.586, 0.166, -0.042, -0.614, 11.72)
    y <- c(0.549, -0.026, -0.127, -0.751, 1.344)
    Give the hat diagonal for the most influential point
  • Consider the following data set
    x <- c(0.586, 0.166, -0.042, -0.614, 11.72)
    y <- c(0.549, -0.026, -0.127, -0.751, 1.344)
    Give the slope dfbeta for the point with the highest hat value. influence.measures(fit5)$infmat[which.max(abs(influence.measures(fit5)$infmat[, 2])), 2]
  • Consider the mtcars data set. Fit a model with mpg as the outcome that includes a number of cylinders as a factor variable and weight as a possible confounding variable. Compare the effect of 8 versus 4 cylinders on mpg for the adjusted and unadjusted by-weight models. Here, adjusted means including the weight variable as a term in the regression model and unadjusted means the model without weight included. What can be said about the effect comparing 8 and 4 cylinders after looking at models with and without weight included?
  • Consider the mtcars data set. Fit a model with mpg as the outcome that considers a number of cylinders as a factor variable and weight as a confounder. Now fit a second model with mpg as the outcome model that considers the interaction between numbers of cylinders (as a factor variable) and weight. Give the P-value for the likelihood ratio test comparing the two models and suggest a model using 0.05 as a type I error rate significance benchmark.
  • Consider the following data set
    x <- c(0.8, 0.47, 0.51, 0.73, 0.36, 0.58, 0.57, 0.85, 0.44, 0.42)
    y <- c(1.39, 0.72, 1.55, 0.48, 1.19, -1.59, 1.23, -0.65, 1.49, 0.05)
    Fit the regression through the origin and get the slope treating $y$ as the outcome and $x$ as the regressor. (Hint, do not center the data since we want regression through the origin, not through the means of the data.)
  • Do data(mtcars) from the datasets package and fit the regression model with mpg as the outcome and weight as the predictor. Give the slope coefficient.
  • Consider the following data set. What is the intercept for fitting the model with $x$ as the predictor and $y$ as the outcome?
    x <- c(0.8, 0.47, 0.51, 0.73, 0.36, 0.58, 0.57, 0.85, 0.44, 0.42)
    y <- c(1.39, 0.72, 1.55, 0.48, 1.19, -1.59, 1.23, -0.65, 1.49, 0.05)

Sampling and Sampling Distributions Quiz with Answers

Intermediate Mathematics Part-I Quiz with Answers

Important MCQs R Package Development 13

The post is about MCQs R Package Development Quiz. The quiz also contains questions about git. There are a total of 17 questions and some of the questions have multiple correct answers. Let us start with MCQs R Package Development.

Please go to Important MCQs R Package Development 13 to view the test

MCQs R Package Development with Answers

R FAQS Logo: MCQs R Package Development
  • Which of the following are good reasons to build an R Package?
  • Which of the following files and folders are required in an R package?
  • Which of the following files and subdirectories will be included in the initial package directory if you create a new package using the ‘create’ function from ‘devtools’?
  • Which of the following functions from the devtools package are you likely to use often, rather than just once per package, when building a package?
  • What is the purpose of the DESCRIPTION file in a package?
  • Which of the following statements correctly describes how R functions should be defined with the package directory?
  • How is attaching a package namespace different from loading a namespace?
  • For packages that require C code, what should be installed on your system?
  • What is the purpose of the Imports field in the DESCRIPTION file?
  • Which of the following are good reasons for open-sourcing your software?
  • When a test fails in a call to expect_that(), what happens?
  • What does the is_a() function do in the context of testthat?
  • In which sub-directory of an R package should tests be placed?
  • What is Git?
  • What is a pull request on GitHub?
  • The GNU General Public License is called a copyleft license because
  • What does the ::: operator do?

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