>> Surely, you mean
>>
>> list dlist = dummify(x, max(c))
> max(x)? That wouldn't work for a list argument, would
it?
> We could insist that dummify takes a series argument, not a
list.
> That would be backward-incompatible but probably wouldn't disturb
> anyone.
Of course, you are correct. I have a blind spot about
max(series), etc because I automatically think of max(list), because that
is the way Stata and other programs work. It is somewhat confusing
to combine the two distinct usages in a single function, but I will get
used to it.
But, with respect to Allin's point, I think that insisting that dummify
should take a series argument isn't a bad idea, since it seems to me that
creating multiple sets of dummy variables at one go can easily create
confusion for the unwary user.
Gordon