Import Classifier Variables

Classifiers are imported into MorphoJ from text files into specific datasets.

First, select a dataset in the Project Tree tab and then choose the menu item Import Classifier Variables in the File menu. This will invoke the following dialog box:

At the top of the dialog box, a label indicates the file that has been chosen. The covariates will be imported to this file only.

The next item is a set of two buttons for choosing how the values of the classifiers are to be matched to observations in the data set: either by the identifier or by a classifier variable that is already present in the dataset. If Identifier is selected, the values of the identifier variable will be used for the match. If the button Classifier variable: is selected, however, the corresponding classifier can be selected from the drop-down menu, and its values will be used for matching.

Below this, there is a check box incating that the first line of the text file contains the names of the new variables for storing classifiers. It can be deselected if the file does not contain such a first line. In this case, MorphoJ will number the classifiers.

The remainder of the dialog contains the interface for selecting the file.

Clicking the Open button will invoke the loading of the file and establishing of new covariates, whereas Cancel will stop the procedure and remove the dialog box.

File structure

Entries in the file should be delimited by tab stops, commas, or semicolons. This means, the file can be prepared in a spreadsheet program and saved as tab-delimited or comma-delimited text.

The file should have the same structure as in the following example:

ID color sex
sp. 1 green m
sp. 2 green f
sp. 3 yellow f
sp. 4 yellow m
sp. 5 green m
sp. 7 green m
sp. 8 red f
sp. 6 orange f

The first line contains the names of the classifiers. The first entry ("ID" in the example above) will be ignored, but the remaining entries will be used as the names of the classifiers. Each covariate should have a different name. The example would create two new covariates named "color" and "sex". In principle, this line can be left out and the corresponding check box in the dialog bos can be deselected, but this is probably not a good idea in most cases.

The following lines contain the actual data.

The first item is the value that is used for matching to the observations in the dataset. Depending on whether the user has chosen to atch observations by the identifier or a classifier variable, these values must match either the identifier of a specimen in the dataset or the value of a classifier. The match must be exact, including spelling and the distinction upper- and lower-case letters (e.g. "sp. 4" is different from "Sp. 4" or "sp 4"), but leading and trailing blanks are ignored. Moreover, the values must be unique; if there are multiple lines with the same value for matching, only the first of these lines is used.

The second and following entries of each line can be text or numbers will be used as the classifiers. These entries can consist of numbers or text, but they must not contain tab stops, commas or semicolons, because those would be interpreted as column delimiters. The treatment of classifiers is case-sensitive ("f" is different from "F").