Intermediate
R
Q66 / 100
What does "match.arg()" do inside a function definition?
Correct! Well done.
Incorrect.
The correct answer is B) Validates and matches a character argument against a set of allowed values, often used for default option arguments
B
Correct Answer
Validates and matches a character argument against a set of allowed values, often used for default option arguments
Explanation
match.arg() is commonly used with arguments like "type = c('a', 'b', 'c')" to validate that the supplied value is one of the allowed choices and supply a default.
Progress
66/100