![]() |
|
| int apop_name_add | ( | apop_name * | n, | |
| char * | add_me, | |||
| char | type | |||
| ) |
Adds a name to the apop_name structure. Puts it at the end of the given list.
| n | An existing, allocated apop_name structure. | |
| add_me | A string. If NULL, do nothing; return -1. | |
| type | 'r': add a row name 'c': add a column name 't': add a text category name 'h': add a title (or a header. 't' is taken). 'v': add (or overwrite) the vector name |
| apop_name* apop_name_alloc | ( | void | ) |
Allocates a name structure
Copy one apop_name structure to another. That is, all data is duplicated. Usage:
apop_name *out = apop_name_copy(in);
| in | the input names |
Deprecated. Use apop_name_stack.
| int apop_name_find | ( | apop_name * | n, | |
| char * | in, | |||
| char | type | |||
| ) |
Finds the position of an element in a list of names.
The function uses case-insensitive regular expressions to search.
For example, "p.val.*" will match "P value", "p.value", and "p values".
| n | the apop_name object to search. | |
| in | the name you seek; see above. | |
| type | 'c', 'r', or 't'. Default is 'c'. |
findme. If 'c', then this may be -1, meaning the vector name. If not found, returns -2. | void apop_name_print | ( | apop_name * | n | ) |
Prints the given list of names to STDOUT
| n | the apop_name structure |
Append one list of names to another.
Notice that if the first list is NULL, then this is a copy function. If the second is NULL, it is a no-op.
| n1 | The first set of names (no default, must not be NULL) | |
| nadd | The second set of names, which will be appended after the first. (no default, if NULL, a no-op) | |
| type1 | Either 'c', 'r', 't', or 'v' stating whether you are merging the columns, rows, or text. If 'v', then ignore typeadd and just overwrite the target vector name with the source name. (default = 'r') | |
| typeadd | Either 'c', 'r', 't', or 'v' stating whether you are merging the columns, rows, or text. If 'v', then overwrite the target with the source vector name. (default = type1) |