R Programming Questions and Answers – R Profiler – 2

This set of R Programming Language Multiple Choice Questions & Answers (MCQs) focuses on “R Profiler – 2”.

1. The profiler can be turned off by passing _________ to Rprof().
a) 0
b) 1
c) 2
d) NULL
View Answer

Answer: d
Explanation: Rprof(NULL) is used to turn off the profiler.

2. Point out the correct statement?
a) Rprof() is used to turn off the profiler
b) At each line of the output, the profiler writes out the function call stack
c) The summaryprof() function tabulates the R profiler output
d) The Rprofiler() function starts the profiler in R
View Answer

Answer: b
Explanation: The Rprofiler() function starts the profiler in R.

3. How many methods exist for normalizing the data?
a) one
b) two
c) three
d) profiler
View Answer

Answer: b
Explanation: There are two methods for normalizing the data.

advertisement

4. _______ divides the time spend in each function by the total run time
a) “by.sum”
b) “by.total”
c) “by.self”
d) “by.del”
View Answer

Answer: b
Explanation: “by.self” does the same as “by.total”.

5. Point out the correct statement?
a) “by.total” first subtracts out time spent in functions above the current function in the call stack
b) The summaryRprof() function calculates how much time is spend in which function
c) By default, the profiler samples the function call stack every 0.02 seconds
d) The Rprofiler() function starts the profiler in R
View Answer

Answer: c
Explanation: Output of by.self is more useful than by.total for interpreting the data.

Free 30-Day Java Certification Bootcamp is Live. Join Now!

6. Which of the following function actually fits the linear model?
a) lm.time()
b) lm.date()
c) lm.fit()
d) lm.interval()
View Answer

Answer: c
Explanation: lm() function does a bit of pre-processing and checking before it actually fits the model.

7. The final bit of output that summaryRprof() provides is the ______ interval and the total runtime.
a) response
b) sampling
c) processing
d) retrieve
View Answer

Answer: b
Explanation: You’re going to be spending a lot of time in preprocessing and checking.

8. Which of the following statement gives sampling interval?
a) $sampling.interval
b) $sampling.time
c) $sampling.date
d) $sampling.datetime
View Answer

Answer: b
Explanation: Sampling time is expressed in secs.

9. Which of the following code is not profiled?
a) C
b) C++
c) Java
d) PHP
View Answer

Answer: a
Explanation: C or Fortran code is not profiled.
advertisement

Sanfoundry Global Education & Learning Series – R Programming Language.

Here’s the list of Best Books in R Programming Language.

To practice all areas of R Programming Language, Here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
I’m Manish - Founder and CTO at Sanfoundry. I’ve been working in tech for over 25 years, with deep focus on Linux kernel, SAN technologies, Advanced C, Full Stack and Scalable website designs.

You can connect with me on LinkedIn, watch my Youtube Masterclasses, or join my Telegram tech discussions.

If you’re in your 40s–60s and exploring new directions in your career, I also offer mentoring. Learn more here.