The apop_data structure represents a data set. It primarily joins together a gsl_vector, a gsl_matrix, and a table of strings, then gives them all row and column names. It tries to be minimally intrusive, so you can use it everywhere you would use a gsl_matrix
or a gsl_vector
.
If you are viewing the HTML documentation, here is a diagram showing a sample data set with all of the elements in place. Together, they represet a data set where each row is an observation, which includes both numeric and text values, and where each row/column is named.
Rowname | Vector | Matrix | Text | Weights |
|
|
Age | Weight (kg) | Height (cm) |
32 | 65 | 175 |
41 | 61 | 165 |
40 | 73 | 181 |
|
Sex | State |
Male | Alaska |
|
Female | Alabama |
Male | Alabama |
|
|
Allocate using apop_data_alloc
, free via apop_data_free
, or more generally, see the apop_data_
... section of the index (in the header links) for the many other functions that operate on this struct.
See also the Data Sets section of the outline page (also in the header links) for further notes on getting and manipulating the elements of an apop_data set.