projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add some news.
[pspp]
/
src
/
cat.c
diff --git
a/src/cat.c
b/src/cat.c
index c4bd17a85d16d459f0da83cff9458edc3e892ba3..9b8ed9661d6c0e3fb8c60c85d8cf561be47df864 100644
(file)
--- a/
src/cat.c
+++ b/
src/cat.c
@@
-130,3
+130,13
@@
cat_subscript_to_value (const size_t s, struct variable *v)
return NULL;
}
}
+
+/*
+ Return the number of categories of a categorical variable.
+ */
+size_t
+cat_get_n_categories (const struct variable *v)
+{
+ return v->obs_vals->n_categories;
+}
+