How do you reverse the characters in a string in R?

How do you reverse the characters in a string in R?

a) reverse()
b) rev_string()
c) str_reverse()
d) rev()

Answer:

c) str_reverse()

Explanation:

The str_reverse() function reverses the order of characters in a string.

Reference:

R Programming – String MCQ Questions and Answers

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top