Turn an observation data.frame into a long data.table
to_long_form(dt, unit, observers, measurements)
dt | `data.table` containing the reliability data in wide format |
---|---|
unit | name of the column containing the unit id |
observers | list of names of the columns containing the oberverments, one per observer |
measurements | name of the new column containing the measurements |
A long-form melted data.table with the same unit column and two new columns "observer" and measurements and as many rows as units.