ExamVeda
Login
Home
41
Which type of comment is not supported in R?
Discuss
Answer & Solution
Answer: Option B
Solution:
R supports single-line comments, but not multiline comments.
42
What is the usage of the keyword ? in R?
Discuss
Answer & Solution
Answer: Option A
Solution:
? is generally used to open the help window at any time.
43
Which symbol is used to start a comment?
Discuss
Answer & Solution
Answer: Option C
Solution:
‘#’ is used to comment a line.
44
Which of the following is the assignment operator?
Discuss
Answer & Solution
Answer: Option A
Solution:
An assignment operator is used to assign a value to a variable.

In JavaScript, = is the assignment operator.

It assigns the value on the right to the variable on the left.

Options <-, ->, and == are not assignment operators.

== is a comparison operator, not an assignment operator.
45
Which of the following is a loosely-typed language?
Discuss
Answer & Solution
Answer: Option C
Solution:
R and S are loosely-typed languages and it supports all of the scalar data types you would expect: string, numbers, and booleans.
46
What is the limit to matrices in R?
Discuss
Answer & Solution
Answer: Option B
Solution:
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]).
47
Which is the function used to add the vectors?
Discuss
Answer & Solution
Answer: Option A
Solution:
The c() function is used to add the vectors.
48
Which of the following list contains multiple data types?
Discuss
Answer & Solution
Answer: Option B
Solution:
Data frames are multidimensional lists that can contain multiple data types.
49
Which function is used to create data frames?
Discuss
Answer & Solution
Answer: Option C
Solution:
The data frames can be created using the data.frame() function which accepts a number of vectors as content, and then the following parameters : row.names to specify the vector to use as row identifiers, check.rows to check consistency of row data, and check.names to check for duplicates among other syntactical checks.
50
What is the purpose of the method plot()?
Discuss
Answer & Solution
Answer: Option B
Solution:
The plot() function will display a different type of chart depending on the arguments that you pass in to it.