Re: [R] Subtracting test string from vectors

2012-06-01 Thread arun
Hi, > one <- c("ciao","zio","caio","bello") > two<-c("ciao","zio") setdiff(one,two) [1] "caio"  "bello" A.K. - Original Message - From: Cren To: r-help@r-project.org Cc: Sent: Friday, Jun

Re: [R] Subtracting test string from vectors

2012-06-01 Thread Rui Barradas
Hello, It works with me. > one <- c("ciao","zio","caio","bello") > two <- c("caio","zio") > setdiff(one, two) [1] "ciao" "bello" Are you sure of the values in your 'one' and 'two'? Rui Barradas Cren wrote > > > Rui Barradas wrote >> >> Hello, >> >> ?setdiff >> setdiff(one, two) >> > Than

Re: [R] Subtracting test string from vectors

2012-06-01 Thread Cren
Rui Barradas wrote > > Hello, > > ?setdiff > setdiff(one, two) > Thank you for your help, Rui. But *> setdiff(one,two) [1] "ciao"* Where's "bello"? -- View this message in context: http://r.789695.n4.nabble.com/Subtracting-test-string-from-vectors-tp4632049p4632053.html Sent from the R hel

Re: [R] Subtracting test string from vectors

2012-06-01 Thread Rui Barradas
Hello, ?setdiff setdiff(one, two) Hope this helps, Rui Barradas Cren wrote > > Hi all, > > let I have two text string: > > *one <- c("ciao","zio","caio","bello") > two <- c("caio","zio")* > > I would like to obtain a new text string which is* one - two* like this > one: > > [1] "ciao" "bel

[R] Subtracting test string from vectors

2012-06-01 Thread Cren
Hi all, let I have two text string: *one <- c("ciao","zio","caio","bello") two <- c("caio","zio")* I would like to obtain a new text string which is* one - two* like this one: [1] "ciao" "bello" because "caio" and "zio" elements have been subtracted from *one*. What's the most efficient way t