[R] Subtracting test string from vectors

arun smartpink111 at yahoo.com
Fri Jun 1 14:06:56 CEST 2012


Hi,

> one <- c("ciao","zio","caio","bello")
> two<-c("ciao","zio")

setdiff(one,two)
[1] "caio"  "bello"


A.K.

----- Original Message -----
From: Cren <oscar.soppelsa at bancaakros.it>
To: r-help at r-project.org
Cc: 
Sent: Friday, June 1, 2012 6:13 AM
Subject: Re: [R] Subtracting test string from vectors


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 help mailing list archive at Nabble.com.

______________________________________________
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