R: Check the classes of specific columns and re-assigns as...
prep_data
R Documentation
Check the classes of specific columns and re-assigns as necessary.
Description
prep_data converts the data frame to a data table and examines the
class of the following columns: Subject, Item, LEFT_INTEREST_AREA_ID,
RIGHT_INTEREST_AREA_ID, LEFT_INTEREST_AREA_LABEL, RIGHT_INTEREST_AREA_LABEL,
TIMESTAMP, and TRIAL_INDEX. If they were not encoded with the correct
class upon importing the data, the function will reassign the class and print
a summary of the reassignments. Additionally, the data table output by
the function contains a new column called Event which indexes each unique
series of samples corresponding to the combination of Subject and
TRIRAL_Index, necessary for performing subsequent operations.