[R] getting data frame rows out of a by object

Ed L Cashin ecashin at uga.edu
Thu Apr 8 16:22:21 CEST 2004

Douglas Bates <bates at stat.wisc.edu> writes:

> The point is that factor(paste(...)) returns a factor with length of
> nrow(d) and with factor levels determined by the combination of levels
> of a and b (provided that you don't get ambiguities as described
> above).  The split function does not require that the factor
> determining the splits be part of the data frame being split.  It can
> be given explicitly as it is here.

I think I need to look at the source of split when I have more time.

> [1] If you really want to be cautious you could use an octal
> representation like sep="\007" to get a character that is very
> unlikely to occur in a factor level.

I definitely want to be cautious.  Instead of the bell character I
think I'll use the field separator character, "\034", just because
this is the first time I've been able to use it for it's intended
purpose!  ;)

--Ed L Cashin            |   PGP public key:
  ecashin at uga.edu        |   http://noserose.net/e/pgp/

More information about the R-help mailing list