Awesome, thanks Arun, that's exactly what I was looking for!


On Sat, Jan 26, 2013 at 9:21 PM, arun kirshna [via R] <
ml-node+s789695n4656749h63@n4.nabble.com> wrote:

> Hi,
> Try this:
> df[]<-lapply(df,as.character)
> df2<-df
> df[,1][grep("@",df$names)]<- ""
> df
>   #names             emails
> #1   bob       bobj@cup.com
> #2   joe joesmith@gmail.com
> #3          craig@gmail.com
> #4 emily   emily2@yahoo.com
> #5           jane@yahoo.com
>
> #2nd part:
>
>  df2[-grep("@",df2$names),]
>   names             emails
> #1   bob       bobj@cup.com
> #2   joe joesmith@gmail.com
> #4 emily   emily2@yahoo.com
> A.K.
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Removing-values-containing-a-specific-character-tp4656744p4656749.html
>  To unsubscribe from Removing values containing a specific character, click
> here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4656744&code=eXBvZGVzd2FAZ21haWwuY29tfDQ2NTY3NDR8LTEyMTY0MzM4NDk=>
> .
> NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://r.789695.n4.nabble.com/Removing-values-containing-a-specific-character-tp4656744p4656750.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

