Out of convenience, data is often entered in a very "wide" format:
there will be two columns for the same variable, one column for each eye.
myop will pivot the eye variable to one column and keep all other
variables wide. E.g., eight columns that store data of four variables for two eyes
will be pivoted to 5 columns (one eye and four further variable columns,
see also examples).
myop requires a specific data format
If there is a column called "eye" or "eyes", myop will not make
any changes - because the data is then already assumed to be in long
format. If you also have columns with eye-specific values,
then you have messy data. Maybe, you could remove or rename the "eye"
column and then let myop do the work.
myop will only recognize meaningful coding for eyes:
Right eyes: "r", "re", "od", "right"
Left eyes: "l", "le", "os", "left"
for other codes see also eye_codes
The strings for eyes need to be separated by period or underscores.
(Periods will be replaced by underscores). Any order is allowed.
Will work: "va_r", "right_morningpressure", "night_iop.le", "gat_os_postop"
Will fail: "VAr", "rightmorningPressure", "night_IOPle", "gatOSpostop"
An exception is when there is only one column for each eye. Then
the column names can consist of eye strings (see above) only.
In this case, var will be used to "name" the resulting variable.
If there are only eye columns in your data (should actually not happen),
myop will create identifiers by row position.
Please always check the result for plausibility.
Depending a lot on how the data was entered, the results could become
quite surprising. There is basically a nearly infinite amount of
possible combinations of how to enter data, and it is likely that
myop will not be able to deal with all of them