My Report

R Programming Practice 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

1. ____________ function can be used to select the random sample of size ‘n’ from a huge dataset.

2. Which function basically finds the intersection between two different sets of data?

3. What will be the output of the following R code?

> printmessage <- function(x) {
+ if(x > 0)
+         print("x is greater than zero")
+ else
+         print("x is less than or equal to zero")
+ invisible(x)
+ }
> printmessage(NA)

4. _________ require you to pass a function whose argument is a vector of parameters.

5. Write a function to extract the first name in the string “Mrs. Jake Luther”?

6. ______________ measures the probability of the binary response variable in R language.

7. Which function is used to select variables and observations from a given dataset?

8. Point out the wrong statement?

9. What will be the output of the following R code?

> nLL <- make.NegLogLik(normals, c(1, FALSE))
> optimize(nLL, c(1e-6, 10))$minimum

10. What would be the value of following R expression?

 log(-1) 

 

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.