0

I am new to R Studio and wondering if there is a way to split a .txt file multiple times based on a character. So, for example, whenever the word "X" comes up in the file, is there a way to split the file there?

Matt
  • 7,255
  • 2
  • 12
  • 34
Callie
  • 1
  • 1
  • Most `read.*` functions will allow you to specify `sep` argument which takes a character string on what to delimitate. – Justin Landis Nov 11 '20 at 15:17
  • [See here](https://stackoverflow.com/q/5963269/5325862) on making a reproducible example that is easier for folks to help with. This is likely something that other posts already have covered, but it's hard to point you in their direction without a clearer example – camille Nov 11 '20 at 15:44

1 Answers1

0

You can get the reuslt you want by loading your text file into a character, then splitting it using the strsplit(x, split) function

David
  • 371
  • 2
  • 13