Skip to contents

This functions bundles all the cleaning functions and allows them to be easily used in parallel processing to speed up the cleaning of all the Vessel Monitoring System, VMS, data .csv files. While it runs, it creates a folder called preprocessed that will store VMS data that underwent the preprocessing. If multiple files are used as input (see examples below) it will create multiple files. All the outputs are in .fst format, which allows fast upload of large files. See fst package documentation for further information https://www.fstpackage.org/.

Usage

preprocessing_vms(files.path, destination.folder)

Arguments

files.path

it can be a path to the file downloaded or the data object itself. If function is used with a path it adds a file column to the returning data.frame object that stores the name of the file as a reference.

destination.folder

it must record the path to a folder were all the preprocessed files will be stored.

Value

A .fst file saved within a directory chosen by the user, that is created automatically if does not exist, and that stores each of the files that are used as input to the function.

Examples


# An example with the `sample.dataset`
# \donttest{
preprocessing_vms(sample_dataset, destination.folder = tempdir())
#> Writing file: vms_2019_1_1_10_preprocessed.fst in the /tmp/Rtmp95VQNC folder
# }