Re: [R] grep etc.

2008-02-11 Thread John Kane
I don't understand exactly what you are asking you can change v from 'insd-otsd' 'sppr-unsp' to 'insd--otsd', 'sppr--unsp' with sub("-", "--",v) However do you want to change the entire assignment statement? --- Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > How do I transfo

Re: [R] grep etc.

2008-02-10 Thread Gabor Csardi
sub("-", "--", v, fixed=TRUE) See ?sub. Gabor On Sun, Feb 10, 2008 at 02:14:48PM -0500, Michael Kubovy wrote: > Dear R-helpers, > > How do I transform > v <- c('insd-otsd', 'sppr-unsp') > into > c('insd--otsd', 'sppr--unsp') > ? > _ > Professor Michael Kubovy > Unive

[R] grep etc.

2008-02-10 Thread Michael Kubovy
Dear R-helpers, How do I transform v <- c('insd-otsd', 'sppr-unsp') into c('insd--otsd', 'sppr--unsp') ? _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gil