Skip to contents

Shows the first few lines in a text file. Useful for trying to understand problems in GPS files.

Usage

check_file(file_name, n_max = 10, ...)

Arguments

file_name

Character. File path to check.

n_max

Numeric. Number of lines in the file to show. Default 10.

...

Arguments passed on to readr::read_lines()

Value

A character vector with one element for each line

Details

Wrapper around readr::read_lines(n_max).

Examples

f <- system.file("extdata", "logfile_00015141_SD1.txt", package = "ARUtools")
check_file(f)
#>  [1] ""                                                           
#>  [2] "-----------------------------------------------------------"
#>  [3] " FRONTIER LABS Bioacoustic Audio Recorder "                 
#>  [4] " Serial Number: 00015141"                                   
#>  [5] " Config: Stereo, Ext-power"                                 
#>  [6] " Firmware: 3.30 (Jul 20 2021 15:53:03)"                     
#>  [7] "-----------------------------------------------------------"
#>  [8] "2022-05-27 11:24:03 SD Card format successful"              
#>  [9] "2022-05-27 11:24:04 SD Card 1 removed!"                     
#> [10] "2022-05-27 11:24:04 SD Card 1 inserted!"