Statistical Computing and Graphics in R

Quiz R Language

The post is about a Quiz on the R Language.

R Language Online Quiz with Answers

1. We obtain the 10000 random sample of size 6 under SRSWOR using the following population (111, 158, 122, 193, 111, 148, 112, 128, 113, 151, 185, 200, 199, 121, 115, 114) which is the R command for repeating this procedure 150 times?

2. Who introduced tidyverse to “share an underlying design philosophy, grammar, and data structures, of tidy data?

3. Which of these dplyr verbs can be used to retrieve columns of a dataset?

4. For the following population x<-c(1,2,3,4,5)what will be the R command for finding mean?

5. Which is the R command for selecting a sample of size 6 from the population yp <- c(111, 159, 121, 198, 120, 136, 14, 129, 17, 115, 186, 119, 121, 153, 143)

6. What is the R command for selecting sample of size $n=10$ by probability proportional to size (PPS) with $N=40$.

7. Which is the R command for selecting a sample of size 3 from the population y<- c(11, 150, 121, 192, 233, 129, 117, 186, 129, 189, 159)

8. What is the R command for generating bi-variate normal distribution

9. What is the class of the object defined by the expression x <- c(4, "a", TRUE)?

10. For the following population y<- c(1,2,3,4,5), what will be the R command for finding variance?

11. Suppose, I have a vector x <- c(3, 6, 1, 19, 12, 8)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?

Scroll to top