[Rd] c.factor

Marc Schwartz marc_schwartz at comcast.net
Wed Nov 15 15:36:40 CET 2006

On Wed, 2006-11-15 at 12:51 +0000, Matthew Dowle wrote:


> I have a solution which works for me, and I have contributed it. One
> other person has shown some interest, and taken it further to work with
> multiple arguments which looks like a nice improvement.

Just for clarification, my interest was only to provide an alternative
that provided for a more generic approach, at least in a narrow
application, not that I was advocating it's need. Perhaps I should have
called the function something else to avoid confusion and that was my
error. Needless to say that we both ignored the overhead of error
checking related functionality.

In my 5 odd years of using R, I would have to acknowledge that I have
yet to have a need for this type of function (save within the context of
merge() and rbind()). That does not mean that I have exhausted the
possibilities over that time, but that in the course of meeting my
particular requirements, it has yet to come up.

I would agree with Prof. Ripley's comments, that one needs to be quite
careful in manipulating factors in this fashion, not the least of which
would be ordered factors, which have not been considered here and
could/would introduce their own idiosyncrasies in this context.

If something like this gets implemented (ie. concat()) one would need to
fully understand the behavioral subtleties and the nature of the
results, lest naive users find themselves in the potential presence of
cascading errors.



More information about the R-devel mailing list