A Shiny R app for splitting large text files into smaller files with equal number of records
library(shiny)
library(shinythemes)
library(dplyr)
➤ Suppose you have a large text file containing a number of records, for instance an autogenerated report log where:
- each record starts with a certain character or string (record identifier)
- records may have different numbers of fields
- records may have different numbers of lines.
➤ Now, you need to split this large file into a number of smaller files where:
- all files have the same number of records
- all files are consistent with the original file in terms of format and text (i.e. no character removed or added)
- the order of the records is not changed
SplittR DOES THAT!
- Browse your local directory to find and upload your text file
- Type the record identifier, i.e a string or character that each new record starts with, as it appears in your file without any extra quotations
- Use the slider to choose the number of output splits
- Click on the Split! button to split the file
- Once the split is done, you can see the results below - If you receive an error, make sure to enter the record identifier correctly!
- Use the download button to download a zip file containing your split files!
✓ You can deploy and use it locally or