How would you extract a substring from a string in R?

  • Use the extract() function
  • Use the slice() function
  • Use the sub() function
  • Use the substring() function
The substring() function in R is used to extract a substring from a string. For example, substring("Hello", 2, 3) would return "el".
Add your answer
Loading...

Leave a comment

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