
The Data Science Foundations with R Practice Test is ideal for those who are en route to becoming certified data scientists. With this R practice Test, one can see where they stand in their data science preparation and work toward filling their knowledge gap. In case you miss any questions, adequate explanations have been provided. We highly recommend you Login / Register to take this test.
- 10 questions in all. There is no time constraint, so take your time. You need to score at least 80% to pass
- You can retake the test at any time. We recommend you share with friends too.
#1. R functionality is divided into a number of _____.
Deal Score0
Login / Register
R functionality is divided into a number of packages. The R system has base and recommended packages. CRAN also hosts many add-on packages that can be used to extend the functionality of R.
#2. The _____ R system contains, among other things, the base package which is required to run R and contains the most fundamental functions.
Deal Score0
Login / Register
R functionality is divided into a number of packages. The “base” package in R contains the most fundamental functions.
#3. Which of the following is a base package for the R language?
Deal Score0
Login / Register
The “base” R system contains, among other things, the base package which is required to run R and contains the most fundamental functions. The other packages contained in the “base” system include utils, stats, datasets, graphics,grDevices, grid, methods, tools, parallel, compiler, splines, tcltk, and stats4.
#4. Which of the following is a recommended package in R?
Deal Score0
Login / Register
“Recommended” packages include boot, class, cluster, codetools, foreign, KernSmooth, lattice, mgcv, nlme, rpart, survival, MASS, spatial, nnet, and Matrix.
#5. Which of the following codes skips the first 20 iterations?
Select all that apply:
Deal Score0
Login / Register
Next is used to skip an iteration of a loop.
Next is used to skip an iteration of a loop.
#6. Which of the following true about loops in R?
Deal Score0
Login / Register
Control structures are primarily useful for writing programs for command line interactive work. Repeat initiates an infinite loop right from the start. Infinite loops should be avoided, even if they are technically correct. The only way to exit a repeat loop is to call break.
#7. _____ initiates an infinite loop right from the start.
Deal Score0
Login / Register
Repeat initiates an infinite loop right from the start. The only way to exit a repeat loops is to call break.
#8. Which of the following code snippets stops a loop after 20 iterations?
Deal Score0
Login / Register
Break is used to exit a loop immediately, regardless of what iteration the loop may be on.
#9. The syntax of the repeat loop is _____.
Deal Score0
Login / Register
The repeat statement causes repeated evaluation of the body until a break is specifically requested.
#10. What will be the output of the following code?
x <-3
switch(x, 2+2, mean(1:10), rnorm(5))
Deal Score0
Login / Register
If the value is a number between 1 and the length of the list, then the corresponding element of list is evaluated and the result returned. Here, EXPR is a number which is 3, hence the third value is taken from the list of values, which is rnorm(5) . Th output for rnorm(5) will get printed.
Results
-
HD Quiz powered by harmonic design