Remove two initial rows created in Qualtrics data
Source:R/remove_label_rows.R
remove_label_rows.Rd
The remove_label_rows()
function filters out the initial label rows from
datasets downloaded from Qualtrics surveys.
Value
An object of the same type as x
that excludes Qualtrics label rows and
with date, logical, and numeric metadata columns converted to the correct
data class.
Details
The function (1) checks if the data set uses Qualtrics column names, (2) checks if label rows are already used as column names, (3) removes label rows if present, and (4) converts date, logical, and numeric metadata columns to proper data type. Datasets imported using qualtRics::fetch_survey() should not need this function.
The convert
argument only converts the StartDate, EndDate,
RecordedDate, Progress, Finished, Duration (in seconds),
LocationLatitude, and LocationLongitude columns. To convert other data
columns, see dplyr::mutate()
.
Examples
# Remove label rows
data(qualtrics_raw)
df <- remove_label_rows(qualtrics_raw)