Move text to the first column and set types to document variables
sort_fields(x, path, text_field, impute_types = TRUE)data.frame; contains texts and document variables
character; file path from which x is created; only use in error message
numeric or character; indicate position of a text column in x
logical; if TRUE, set types of variables automatically