732). What is the usage of the keyword ?? in R?
[A]Help window
[B]Extensive search
[C]Error correction
[D]Error detection
Show Answer
Correct Answer: Extensive search
Notes:
Answer: b
Explanation: The ?? function scans the documentation for packages installed in your library. ?? (keyword) is generally used for a more extensive search when compared to the keyword ?.
733). Which type of comment is not supported in R?
[A]Single-line comments
[B]Multi-line comments
[C]Both Single-line & Multi-line comments
[D]Multiple Comments
Show Answer
Correct Answer: Multi-line comments
Notes:
Answer: b
Explanation: R supports single-line comments, but not multiline comments. # is used for making a single line comment.
734). What is the usage of the keyword ? in R?
[A]Help window
[B] Extensive search
[C]Error correction
[D] Error detection
Show Answer
Correct Answer: Help window
Notes:
Answer: a
Explanation: ? is generally used to open the help window at any time. The help() function and ? help operator in R provides access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for contributed packages.
735). Which symbol is used to start a comment?
Show Answer
Correct Answer: #
Notes:
Answer: c
Explanation: ‘#’ is used to comment a line. A single line comment can be made in R.
736). Which of the following is the assignment operator?
Show Answer
Correct Answer: <-
Notes:
Answer: a
Explanation: The operators <- and = can be used, almost interchangeably, to assign to a variable in the same environment. The assignment operator is a left-pointing arrow, so creating and declaring variables looks like this:
foo <- bar
737). Which of the following is a loosely-typed language?
[A]R
[B]T
[C]S
[D]Both R and S
Show Answer
Correct Answer: S
Notes:
Answer: c
Explanation: R is an implementation of the S programming language combined with lexical scoping semantics, inspired by Scheme. [15] S was created by John Chambers in 1976, while at Bell Labs. R and S are loosely-typed languages and it supports all of the scalar data types you would expect: string, numbers, and booleans.
738). What is the limit to matrices in R?
[A]One dimensional
[B]Two dimensional
[C]Three dimensional
[D] No limit
Show Answer
Correct Answer: Two dimensional
Notes:
Answer: b
Explanation: Matrices are like strictly typed two-dimensional arrays. You create a matrix using the matrix function, which accepts five parameters: a vector to use as the content, the number of rows to shape the content into, the number of columns to shape the content into, an optional boolean value to indicate whether the content should be shaped by row or by column (the default is FALSE for by column), and a list that contains vectors for row names and column names:
matrix([content vector], nrow=[number of rows], ncol=[number of columns], byrow=[how to sort], dimnames=[vector of row names, vector of column names]).
739). Which is the function used to add the vectors?
[A]c()
[B]add(vectors)
[C] c(vectors)
[D] vectors.add
Show Answer
Correct Answer: c()
Notes:
Answer: a
Explanation: The c() is a generic function which combines its arguments. It is used to add the vectors.
740). Which of the following list contains multiple data types?
[A]Vectors
[B]Data frames
[C]Matrices
[D]Arrays
Show Answer
Correct Answer: Data frames
Notes:
Answer: b
Explanation: Data frames are multidimensional lists that can contain multiple data types.
741). Which function is used to create data frames?
[A]data.frames()
[B]frame.data()
[C]data.frame()
[D]frame(data)
Show Answer
Correct Answer: data.frame()
Notes:
Answer: c
Explanation: Data frames are multidimensional lists that can contain multiple data types. A data frame is a table or a two-dimensional array-like structure in which each column contains values of one variable and each row contains one set of values from each column.