Which function is used to split a string in R?

Which function is used to split a string in R?

a) split()
b) strsplit()
c) divide()
d) slice()

Answer:

b) strsplit()

Explanation:

The strsplit() function splits a string into substrings based on a specified delimiter.

Reference:

R Programming – String MCQ Questions and Answers

Scroll to Top