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.
The strsplit()
function splits a string into substrings based on a specified delimiter.