Linear Discriminant Analysis takes a data set of cases (also known as observations) as input. For each case, you need to have a categorical variable to define the class and several predictor variables (which are numeric). We often visualize this input data as a matrix, such as shown below, with each case being a row and each variable a column. In this example, the categorical variable is called “class” and the predictive variables (which are numeric) are the other columns.
Following this is a clear example of how to use LDA. This post is also the second time this week somebody has suggested The Elements of Statistical Learning, so I probably should make time to look at the book.