Free Data Science Foundations with R Practice Test

Take the Data Science with R programming free practice examination and test your understanding of real-world data science and R concepts.

  • 102 Questions,
  • 180 Minutes
Related course

Data Science Certification Training - R Programming

Become an expert in the various data analytics techniques using R. Master the data exploration, data visualization, predictive analytics ...

Get 15% DiscountCoupon will be auto applied. GO TO COURSE
Instructions:

1. This is a FREE test and can be attempted multiple times. But it is recommended to take the test when you are ready for best practice experience.

2. Test Duration: 180 Minutes

3. Number of questions: 102 Multiple Choice Questions

4. Each question has multiple options out of which one or more may be correct

5. You can pause the test in between and you are allowed to re-take the test later. Your test will resume from where you left, but the test time will be reduced by the amount of time you've taken in the previous attempt.

Please fill the form below to start the Practice Test
Name*
Email*
+91-
Phone Number*
{{seconds | secondsToDate | date:'HH:mm:ss'}} Time remaining
1. R functionality is divided into a number of _____.
2. The _____ R system contains, among other things, the base package which is required to run R and contains the most fundamental functions.
3. Which of the following is a base package for the R language?
4. Which of the following is a recommended package in R?
5. Which of the following codes skips the first 20 iterations?
6. Which of the following true about loops in R?
7. _____ initiates an infinite loop right from the start.
8. Which of the following code snippets stops a loop after 20 iterations?
9. Which of the following codes can be used to avoid numeric problems such as taking the logarithm of a negative number?
10. The syntax of the repeat loop is _____.
11. What will be the output of the following code? x <-3 >switch(x, 2+2, mean(1:10), rnorm(5)) 2.2903605 2.3271663 -0.7060073 1.3622045 -0.2892720
12. _____ is used to skip an iteration of a loop.
13. What will be the output of the following code? > x <-2 >switch(2, 2+2, mean(1:10), rnorm(5))
14. Which of the following is true of R statements?
15. What will be the output of following code? x <-3 >switch(6, 2+2, mean(1:10), rnorm(5))
16. What will be the output of the following code? y <-"fruit" >switch(y, fruit ="banana", vegetable ="broccoli", "Neither")
17. Which of the following is true about control statements?
18. What will be the output of the following code? centre <-function(x, type){ +switch(type, +mean=mean(x), +median=median(x), + trimmed =mean(x, trim = .1)) +} x <-raunchy(10) >center(x, "mean")
19. Which statement is correct about Dissimilarity?
20. Which of the following codes will print "Neither"?
21. R has ____ basic indexing operators.
22. Which of the following is represented by the formula given below?
23. The syntax of the "for loop" is _____.
24. Which code syntax is syntactically valid?
25. Which of the following is an apply function in R?
26. Which of the following statements is true of R functions?
27. Functions are defined using the _____ directive and are stored as R objects.
28. What will be the output of the following code?f <-function(){+## This is an empty function+}f()
29. What will be the output of the following code? f <-function(){ +## This is an empty function +} >class(f)
30. Which of the following codes will print Hello
31. The syntax of the "for loop" is _____.
32. What will be the output of following code? f<-function(num){ +for(i inseq_len(num)) +cat("Hello, world!\n") +} f(3)
33. What will be the output of the following code? > f<-function(num){ + hello <-"Hello, world!\n" +for(i inseq_len(num)){ +cat(hello) +} + chars <-nchar(hello)* num + chars +} > meaningoflife <- f(3) >print(meaningoflife)
34. What will be the output of the following code snippet? >lm<-function(x){ x * x } >lm
35. Identify an accurate statement about lists in R.
36. A function, together with an environment, makes up what is called a _____ closure.
37. Which of the variables in the following code is variable? f <-function(x, y){ + x^2+ y / z +}
38. R uses _____ scoping or static scoping.
39. The only environment without a parent is the _____ environment.
40. The _____ for R are the main feature that makes it different from the original S language.
41. The _____ function is a kind of "constructor function" that can be used to construct other functions.
42. What will be the output of the following code? g <-function(x){ + a <-3 + x+a+y +} g(2)
43. What will be the output of the following code? g <-function(x,y){ + a <-3 + x+a+y +} y <-3 g(2,y)
44. What will be the output of the following code? nLL <- make.NegLogLik(normals, c(1, FALSE)) >optimize(nLL, c(1e-6, 10))$minimum
45. The _____ function is used to plot negative likelihood.
46. Which of the following is an example of vectorized operations as far as subtraction is concerned? x <-1:4 y <-6:9
47. What would be the output of the following code? x <-1:4 y <-6:9 z <- x + y z
48. What would be the output of the following code? x <-1:4 x >2
49. What would be the output of the following code? x <-1:4 y <-6:9 x/y
50. What would be the output of the following code? x <-matrix(1:4, 2, 2) y <-matrix(rep(10, 4), 2, 2) x * y
51. Which of the following codes represents internal representation of a Date object?
52. What would be the output of the following code? x <-as.Date("1970-01-01") x
53. Which of the following lists names of variables in a data.frame?
54. What would be the output of the following code? >x <- c(1, 2, NA, 4, NA, 5) bad <- is.na(x) >print(bad)
55. Which of the following statements is true about R data structures?
56. What will be the output of the following code? vec <- c(1,"hello",TRUE)
57. How do you rearrange the order of a column in a data set using dplyr functions?
58. Define lapply.
59. Which of the following is true about the apply function(x, margin, function)?
60. _____ visualization can be used to highlight the most commonly cited words in a text.
61. Which statement is correct about the correlation value of +.70 ?
62. Which of the following types of data gives the highest information content?
63. Which of the following statements will save the output to the file for the following code? a <-data.frame(x =rnorm(100), y =runif(100)) b <-c(3, 4.4, 1/3)
64. Which of the following returns a subset of the columns of a data frame?
65. Identify the correct statement about data structures in R.
66. _____ extracts a subset of rows from a data frame based on the logical conditions.
67. _____ generates the summary statistics of different variables in the data frame, possibly within the strata.
68. _____adds new variables/columns or transform existing variables.
69. The _____ operator is used to connect multiple verb actions together into a pipeline.
70. The dplyr package can be installed from GitHub, using the _____ package.
71. The dplyr package can be installed from CRAN, using _____.
72. Which of the following objects is masked from "package:stats"?
73. _____ is rapidly being adopted for computing descriptive and query types of analytics on Big Data.
74. What would be the result of following R code? x <-1 >print(x)
75. Files containing R scripts end with the extension _____.
76. If commands are stored in an external file, say commands.R in the working directory work, they may be executed at any time in an R session with the command:
77. _____ will divert all subsequent outputs from the console to an external file.
78. The entities that R creates and manipulates are known as _____.
79. Which of the following can be used to display the names of (most of) the objects that are currently stored within R?
80. A collection of objects currently stored in R is called _____.
81. Which of the following code is the example of an explicit printing?
82. _____ programming language is a dialect of S.
83. In 2004, _____ purchased the S language from Lucent for $2 million.
84. In 1991, R was created by Ross Ihaka and Robert Gentleman in the Department of Statistics at the University of _____.
85. In the _____,R version 1.0.0 was released to the public.
86. R is technically much closer to the Scheme language than it is to the original _____ language.
87. The R-help and _____ mailing lists have been highly active for over a decade now.
88. Which of the following statements about R is true?
89. The copyright for the primary source code for R is held by the _____ Foundation.
90. Identify the correct statement about R statements and data structures.
91. What would be the result of following code? x <-6 >class(x)
92. What will the following code print? x <-0:6 >as.logical(x)
93. Which of the following is a valid assignment?
94. What would be the output of the following code? >sqrt(-17)
95. Which of the following codes constructs a vector of length 11?
96. _____ function returns a vector of the same size as x with the elements arranged in an increasing order.
97. Which of the following codes is used for generating sequences?
98. Which of the following codes extracts the first element from the following list? x <-list(foo =1:4, bar =0.6)
99. What would be the output of the following code? x <-list(foo =1:4, bar =0.6, baz ="hello") name <-"foo" x$name
100. What would be the output of the following code? x <-list(foo =1:4, bar =0.6, baz ="hello") name <-"foo" x[[name]]
101. What would be the output of the following code? x <-list(a =list(10, 12, 14), b =c(3.14, 2.81)) x[[c(1, 3)]]
102. What would be the output of the following code? x <-list(aardvark =1:5) x[["a", exact = FALSE]]
{{ seconds | secondsToDate | date:'HH:mm:ss'}} Time remaining
NOTE

All test progress will be lost in case you close the browser without finishing the test. Please finish the test to access your results.

  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.

Request more information

For individuals
For business
Name*
Email*
Phone Number*
Your Message (Optional)
We are looking into your query.
Our consultants will get in touch with you soon.

A Simplilearn representative will get back to you in one business day.

First Name*
Last Name*
Email*
Phone Number*
Company*
Job Title*