How do you convert a string to uppercase in R?

How do you convert a string to uppercase in R?

a) toupper()
b) toUpperCase()
c) upper()
d) str_upper()

Answer:

a) toupper()

Explanation:

The toupper() function converts all characters of a string to uppercase in R.

Reference:

R Programming – String MCQ Questions and Answers

Scroll to Top