My Report

R Programming Mock Test 6


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. The cumulative frequency distribution of a categorical variable can be checked using the ________ function in R language.

Question 1 of 10

Question 2 of 10

2. What will be the output of the following R code snippet?

> g <- function(x) {
+             a <- 3
+             x+a+y
+          ## 'y' is a free variable
+ }
> g(2)

Question 2 of 10

Question 3 of 10

3. Which of the following language supports lexical scoping?

Question 3 of 10

Question 4 of 10

4. The _________ function is a kind of “constructor function” that can be used to construct other functions.

Question 4 of 10

Question 5 of 10

5. Which of the following R code will print the following result?

[[1]]
[1] 2.263808
[[2]]
[1] 1.314165 9.815635
[[3]]
[1] 3.270137 5.069395 6.814425
[[4]]
[1] 0.9916910 1.1890256 0.5043966 9.2925392

Question 5 of 10

Question 6 of 10

6. Which of the variable in the following R code is variable?

> f <- function(x, y) {
+            x^2 + y / z
+ }

Question 6 of 10

Question 7 of 10

7. Point out the correct statement?

Question 7 of 10

Question 8 of 10

8. How will you check if an element is present in a vector?

Question 8 of 10

Question 9 of 10

9. The line of code in R language should begin with a ________________

Question 9 of 10

Question 10 of 10

10. What will be the output of the following R code snippet?

> lm <- function(x) { x * x }
> lm 

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.