Uses import_wpa() to read a Workplace Analytics query in '.csv' and convert this into the serialized '.csv' format which is much faster to read. The 'fst' package must be installed, or an error message is returned.

import_to_fst(path, ...)

Arguments

path

String containing the path to the Workplace Analytics query to be imported. The input file must be a CSV file, and the file extension must be explicitly entered, e.g. "/files/standard query.csv". The converted FST file will be saved in the same directory with a different file extension.

...

Additional arguments to pass to import_wpa().

Value

There is no return value. A file with '.fst' extension is written to the same directory where the '.csv' file is read in.

Details

The fst package provides a way to serialize data frames in R which makes loading data much faster than CSV. import_to_fst() converts a CSV file into a FST file in the specified directory.

Once this FST file is created, it can be read into R using fst::read_fst(). Since import_to_fst() only does conversion but not loading, it should normally only be run once at the beginning of each piece of analysis, and fst::read_fst() should take over the job of data loading at the start of your analysis script.

Internally, import_to_fst() uses import_wpa(), and additional arguments to import_wpa() can be passed with ....

See also

Other Import and Export: copy_df(), create_dt(), export(), import_wpa(), standardise_pq()