This function is run when a user clicks the "Load mixture data" button in the
main MixSIAR GUI, and creates a separate GUI window (mix_win
) where
the user loads the mixture data file. build_mix_win
calls
load_mix_data
when the user clicks the "I'm finished" button.
build_mix_win()
The "Load mix data" window contains:
"Load consumer data file" gbutton which loads the .csv file into X
,
gtables where the user selects which columns of X
are Isotopes
and Fixed/Random/Continuous Effects.
(formerly) Individual Effect gcheckbox ("Include 'Individual' as a Random Effect"),
"I'm finished" gbutton that closes mix_win
and calls
load_mix_data
.
If more than 2 Fixed/Random Effects are selected, a separate WARNING gwindow prompts the user to select 2, 1, or 0.
If more than 1 Continuous Effect is selected, a separate WARNING gwindow prompts the user to select 1 or 0.
If 2 Fixed/Random Effects are selected, a separate gwindow asks the user if the effects are hierarchical/nested.
Finally, the function adds a green check image if the data is successfully loaded, or a red_x image if not.
load_mix_data
, which is run when the "Load MIX data"
window is closed by clicking the "I'm finished" button.