updateFiles {PAMpal} | R Documentation |
Update Location of Files in an AcousticStudy
Description
Updates the stored locations of binary, database, and/or recording
files in the files
slots of an AcousticStudy and all
AcousticEvent objects within. Runs interactively to prompt
users to select folders if missing files are found. Typically used after changing
computers, or if original data was on an external hard drive. If any
missing files are not able to be located, they will be kept in the files
slot so that this function can be run again
Usage
updateFiles(
x,
bin = NULL,
db = NULL,
recording = NULL,
verbose = TRUE,
check = TRUE
)
Arguments
x |
an AcousticStudy or AcousticEvent object |
bin |
folder containing updated binary file locations. If
|
db |
single file or folder containing updated database file locations.
|
recording |
folder containing updated recording file locations. If
|
verbose |
logical flag to print messages about success of replacement |
check |
logical flag to do extra checking. You do not need to set this parameter, used internally for speed purposes so certain checks are not repeated |
Value
the same AcousticStudy and
AcousticEvent object as x
with
updated file locations
Author(s)
Taiki Sakai taiki.sakai@noaa.gov
Examples
data(exStudy)
# files in exStudy will have paths local to package creator's computer
files(exStudy)$db
file.exists(files(exStudy)$db)
files(exStudy)$binaries
file.exists(files(exStudy)$binaries)
# folder with example DB
db <- system.file('extdata', package='PAMpal')
# folder with example binaries
bin <- system.file('extdata', 'Binaries', package='PAMpal')
exStudy <- updateFiles(exStudy, db=db, bin=bin)
files(exStudy)$db
file.exists(files(exStudy)$db)
files(exStudy)$binaries
file.exists(files(exStudy)$binaries)