Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. What would be the result of following R code ?

> x <- 1
> print(x)

a) 1
b) 2
c) 3
d) All of the mentioned

View Answer

Answer: a [Reason:] When a complete expression is entered at the prompt, it is evaluated and the result of the evaluated expression is returned.

2. Point out the wrong statement :
a) The grammar of the language determines whether an expression is complete or not
b) The >- symbol is the assignment operator in R
c) The ## character indicates a comment
d) None of the mentioned

View Answer

Answer: c [Reason:] Unlike some other languages, R does not support multi-line comments or comment blocks.

3. Which of the following code is example of explicit printing ?
a)

> x <- 5 
> x

b)

> x <- 5 
> print(x)

c)

> x <- "auto" 
> x

d) All of the mentioned

View Answer

Answer: b [Reason:] Print command is used for outputting the value.

4. Files containing R scripts ends with extension :
a) .S
b) .R
c) .Rp
d) All of the mentioned

View Answer

Answer: b [Reason:] Under many versions of UNIX and on Windows, R provides a mechanism for recalling and re-executing previous commands.

5. Point out the wrong statement :
a) : operator is used to create integer sequences
b) The numbers in the square brackets are part of the vector itself
c) There is a difference between the actual R object and the manner in which that R object is printed to the console
d) All of the mentioned

View Answer

Answer: b [Reason:] They are merely part of the printed output.

6. 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 :
a) source(“commands.R”)
b) exec(“commands.R”)
c) execute(“commands.R”)
d) all of the mentioned

View Answer

Answer: a [Reason:] For Windows, Source is also available on the File menu.

7. _______ will divert all subsequent output from the console to an external file.
a) sink
b) div
c) exp
d) none of the mentioned

View Answer

Answer: a [Reason:] sink() restores it to the console once again.

8. The entities that R creates and manipulates are known as ________
a) objects
b) task
c) container
d) all of the mentioned

View Answer

Answer: a [Reason:] These may be variables, arrays of numbers, character strings, functions, or more general structures built from such components.

9. Which of the following can be used to display the names of (most of) the objects which are currently stored within R ?
a) object()
b) objects()
c) list()
d) none of the mentioned

View Answer

Answer: b [Reason:] During an R session, objects are created and stored by name.

10. Collection of objects currently stored in R is called as :
a) package
b) workspace
c) list
d) none of the mentioned

View Answer

Answer: b [Reason:] All objects created during an R session can be stored permanently in a file for use in future R sessions.

Synopsis and Project Report

You can buy synopsis and project from distpub.com. Just visit https://distpub.com/product-category/projects/ and buy your university/institute project from distpub.com