Data Science Questions and Answers Part-15

1. Which of the following function is used for quantiles of quantitative values?
a) quantile
b) quantity
c) quantiles
d) all of the mentioned

Answer: a
Explanation: In probability and statistics, the quantile function specifies, for a given probability in the probability distribution of a random variable, the value at which the probability of the random variable will be less than or equal to that probability.

2. Which of the following function is used for determining missing values?
a) any
b) all
c) is
d) all of the mentioned

Answer: d
Explanation: In R, missing values are represented by the symbol NA.

3. Point out the wrong statement.
a) Common variables are used to create missingness vector
b) Common variables are used to cutting up quantitative variables
c) Common variables are not used to apply transforms
d) All of the mentioned

Answer: c
Explanation: Common variables are not used to apply transforms.

4. Which of the following transforms can be performed with data value?
a) log2
b) cos
c) log10
d) all of the mentioned

Answer: d
Explanation: Many common transforms can be applied to the data with R.

5. Each observation forms a column in tidy data.
a) True
b) False

Answer: b
Explanation: Each variable forms a column in tidy data.

6. Which of the following function is used for casting data frames?
a) dcast
b) ucast
c) rcast
d) all of the mentioned

Answer: a
Explanation: Use acast or dcast depending on whether you want vector/matrix/array output or data frame output.

7. Which of the following join is by default used in plyr package?
a) left
b) right
c) full
d) all of the mentioned

Answer: a
Explanation: Join is faster in plyr package.

8. mutate function is used for casting as multi dimensional arrays.
a) True
b) False

Answer: b
Explanation: mutate is used for adding new variables.

9. Which of the following function is good for the automatic splitting of names?
a) split
b) strsplit
c) autsplit
d) none of the mentioned

Answer: b
Explanation: strsplit split a character string or vector of character strings using a regular expression or a literal string.

10. Point out the correct statement.
a) gsub is used for fixing character vectors
b) sub is used for finding values like grep
c) grep is used for fixing character vectors
d) none of the mentioned

Answer: a
Explanation: sub and gsub is used for fixing character vectors.