Knowledge Quiz: Getting Help

Note
  • Click the check-mark button to check your answer.
  • Click the question-mark button to see an explanation of the solution.

Which section of an R package help file would you reference to learn the order in which the function arguments are specified in the function definition?

The Usage section shows all the possible arguments for a function and the order in which those arguments are defined.

Which section of an R package help file would you reference to learn the default values for a function’s arguments.

Both the Usage and Arguments sections will show the default values for arguments that have default values defined.

Use the following help file excerpt to answer the question below.

cor R Documentation

Correlation, Variance and Covariance (Matrices)

Usage

var(x, y = NULL, na.rm = FALSE, use)

cov(x, y = NULL, use = "everything",
    method = c("pearson", "kendall", "spearman"))

cor(x, y = NULL, use = "everything",
    method = c("pearson", "kendall", "spearman"))

cov2cor(V)

What is the default value for the use argument of the cor() function?

The default value for the use argument is "everything".

  • Wrong: These are all of the possible methods
  • Wrong: This is one of the possible methods
  • Wrong: This is an argument name
  • Wrong: This is the default value for y
  • Correct
Back to top