Skip to content
Prev 171451 / 398503 Next

Semantics of sequences in R

Okay, here is one that should change:  'c()' should do something useful 
with factors, for example return a factor whose levels are the union of
the 
levels of the arguments.  Note that precedent for this already exists 
in base R:
[1] 1 2 3 1 2 3
'data.frame':   6 obs. of  1 variable:
 $ f: Factor w/ 5 levels "a","b","c","d",..: 1 2 3 3 4 5

So the code and documentation already exist in 'rbind.data.frame'.  As 
for what would break, well, it is hard to imagine any possible use for 
the current behavior, or who could have made use of it.  But you never 
know I guess ...

Rich Raubertas
Merck & Co.
Notice:  This e-mail message, together with any attachme...{{dropped:12}}