[R] grep etc.

John Kane jrkrideau at yahoo.ca
Mon Feb 11 15:54:39 CET 2008


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 <kubovy at virginia.edu> wrote:

> 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 400400    Charlottesville, VA
> 22904-4400
> Parcels:    Room 102        Gilmer Hall
>          McCormick Road    Charlottesville, VA 22903
> Office:    B011    +1-434-982-4729
> Lab:        B019    +1-434-982-4751
> Fax:        +1-434-982-4766
> WWW:    http://www.people.virginia.edu/~mk9y/
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



More information about the R-help mailing list