new sep argument for interaction (was: Re: [R] Concatenating variables)

Deepayan Sarkar deepayan at stat.wisc.edu
Thu Aug 5 00:32:02 CEST 2004


On Wednesday 04 August 2004 15:50, Gabor Grothendieck wrote:

> Several people have already mentioned paste, which returns a
> character result, and two other solutions, depending on what you are
> looking for, are:
>
>    with(tenn, 100 * up + 10 * down + stable)  # numeric result
>
>    with(tenn, interaction(up, down, stable, sep =""))  # factor
> result

Except that interaction doesn't have a sep= argument. 

I think it would be useful to have one, and this was also suggested by 
Ted Harding back in June:

http://tolstoy.newcastle.edu.au/R/help/04/06/0984.html

Any reason against implementing this?

Deepayan




More information about the R-help mailing list