Reading multiple files

All read_ functions accept either a single file or a vector of files as input. If you, for instance, have a folder on your computer that contains multiple EAF files and you want to read all of them as a single data frame, you can use the list.files() function in R to first get a vector of files, and then use this as input to the read_eaf() function.

eaf_files <- 
  list.files(path = "/path/to/my/eaf/files/", # The path your files
             pattern = "\\.eaf$", # Specifying files ending with ".eaf" only
             full.names = TRUE, # Specifying full file names as input
             recursive = TRUE # In case there are subfolders within the folders
  )

annotations <- 
  read_eaf(file = eaf_files,
           progress = TRUE # Print the progress as it iterates over files
           )

If progress is set to TRUE, as in the example above, a progress bar will be printed to the console as files are read. This can be nice when reading multiple files that take some time to complete, since it gives you a visual illustration of how far the iteration has progressed.