import_wpa {wpa}R Documentation

Import a Workplace Analytics Query

Description

Import a Workplace Analytics Query from a local CSV File, with variable classifications optimised for other 'wpa' functions.

Usage

import_wpa(x, standardise = FALSE, encoding = "UTF-8")

Arguments

x

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"

standardise

logical. If TRUE, import_wpa() runs standardise_pq() to make a Collaboration Assessment query's columns name standard and consistent with a Standard Person Query. Note that this will have no effect if the query being imported is not a Ways of Working Assessment query. Defaults as FALSE.

encoding

String to specify encoding to be used within data.table::fread(). See data.table::fread() documentation for more information. Defaults to 'UTF-8'.

Details

import_wpa() uses data.table::fread() to import CSV files for speed, and by default stringsAsFactors is set to FALSE. A data frame is returned by the function (not a data.table).

Value

A tibble is returned.

See Also

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


[Package wpa version 1.9.1 Index]